When I looked at the functionality of Handler.obtainMessage () , I read that it retrieves the message from the global message pool instead of creating a new message instance. Where is this shared message pool located?Is this a collection of all the message objects that were created earlier?
It just means that dalvik stores messages in a pool of recycled objects. They are created and saved from the static pool thread:
private static Message sPool;
, , recyle.
.
: heap.
Message. static. .
Message
static
recycle().
recycle()
:
Message obtain() :
http://androidxref.com/4.4.2_r1/xref/frameworks/base/core/java/android/os/Message.java#106
( ), .
public void recycle(), .
public void recycle()
Source: https://habr.com/ru/post/1526558/More articles:How can I interact with the Coinbase API? Why does this always fail? - ajaxSELECT DISTINCT still showing duplicates - sqlIs it correct to have a variable with the same name as the namespace? - c ++Transaction Timeout - c #Detecting directories opened by java.lang.Class.getResourceAsStream () - javaКласс объектов, полученных из иерархии - jpaReadonly, non-mutable, public and readwrite, mutable, private @property: more information? - propertiesios 7 drawViewHierarchyInRect: afterScreenUpdates: iPad black screen only - iosEclipse skips lines when debugging - javaHow to pass a substitution argument, for example * .txt in windows cmd - pythonAll Articles