Android中定义了两种智能指针类型,一种是强指针sp(strong pointer),一种是弱指针(weak pointer)其实称为强引用和弱引用更合适一些强指针与一般意义的智能指针概念相同,通过引用计数来记录有多少使用者在使用一个对象,如果所...
基于38个网页-相关网页
If a pointer pointing to an object not in the graph, then the object is not a reachable object, and then garbage collector sets the slot to null in the short weak reference table.
如果一个指针指向一个不在图中的对象,那么此对象就是一个不可到达的对象,垃圾收集器就将短弱引用表相应的槽置空。
If a pointer pointing to an object not in the graph, then the object is not a reachable object, and then garbage collector sets the slot to null in the long weak reference table.
如果一个指针指向一个不在图中的对象(注意此时图中已包含Finalize可到达的对象),那么此对象就是一个不可到达的对象,垃圾收集器就将长弱引用表相应的槽置空。
应用推荐