1. Download our Official Android App: Forums for Android!

clearing http get variables

Discussion in 'Android Apps & Games' started by peamealbacon, Jan 31, 2014.

  1. peamealbacon

    peamealbacon Lurker
    Thread Starter
    Rank:
    None
    Points:
    5
    Posts:
    2
    Joined:
    Jan 31, 2014

    Jan 31, 2014
    2
    0
    5
    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?
     

    Advertisement

  2. codesplice

    codesplice Elite Recognized Moderator
    Moderator
    Rank:
     #23
    Points:
    1,063
    Posts:
    8,459
    Joined:
    Oct 29, 2013

    Oct 29, 2013
    8,459
    9,624
    1,063
    Male
    SysAdmin
    Huntsville, AL
    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.
     
    peamealbacon likes this.
  3. peamealbacon

    peamealbacon Lurker
    Thread Starter
    Rank:
    None
    Points:
    5
    Posts:
    2
    Joined:
    Jan 31, 2014

    Jan 31, 2014
    2
    0
    5
    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.
     

Share This Page

Loading...