• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

clearing http get variables

I have a task that fetches an image using http get and sets it as my wallpaper. It's working great but as I understand it, http data is stored in the %HTTPD variable which means the it should contain the image data each time it updates. It would seem to me that having a whole image just chilling in memory would be a bad idea. Should I be clearing this variable whenever I run the script?
 
Firstly, welcome to the board! We're glad that you've decided to join the party.

Good housekeeping dictates that you should clear variables when you don't need them anymore - but I don't know how necessary that actually is (and can't really find anything on the subject). My thought is that the image data is already hanging about in memory anyway so it probably isn't hurting anything by leaving the variable active, but, again, clearing it when not needed is probably a good idea for sanity's sake.
 
Thanks! I ended up setting an action to clear %HTTPD when the script is done, probably not a huge difference but I don't think it'll do any harm.
 
Back
Top Bottom