android - When to use object.recycle() in java? -


i learning android development , have basic knowledge of java. see .recycle() being used in different codes. reading few documents learnt method used recycle bitmaps save memory avoid exceptions outofmemoryerror (however, may alternative on android version 3.0 , higher, saw somewhere).

however, reading tutorial custom views , came know method recycle() used typedarray; left me wondering other possible uses of method. questions are:

  1. what other areas recycle should used?
  2. should recycle method used objects of user created class if grow complex?

i may entirely wrong concepts above, if can please point me right direction proper links articles 'when use recycle() , why?', thanks.


Comments

Popular posts from this blog

facebook - android ACTION_SEND to share with specific application only -

python - Creating a new virtualenv gives a permissions error -

javascript - cocos2d-js draw circle not instantly -