CachedTypedWritableReferenceCount¶
-
class CachedTypedWritableReferenceCount¶
Bases:
TypedWritableReferenceCountThis is a special extension to
ReferenceCountthat includes dual reference counts: the standard reference count number, which includes all references to the object, and a separate number (the cache reference count) that counts the number of references to the object just within its cache alone. Whenget_ref_count()==get_cache_ref_count(), the object is not referenced outside the cache.The cache refs must be explicitly maintained; there is no PointerTo<> class to maintain the cache reference counts automatically. The cache reference count is automatically included in the overall reference count: calling
cache_ref()andcache_unref()automatically callsref()andunref().Inheritance diagram
digraph inheritance14134c61eb { bgcolor=transparent; rankdir=BT; size="8.0, 12.0"; "CachedTypedWritableReferenceCount" [URL="acron.core.CachedTypedWritableReferenceCount.html#acron.core.CachedTypedWritableReferenceCount",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "TypedWritableReferenceCount" -> "CachedTypedWritableReferenceCount" [arrowsize=0.75,style=""]; "DTOOL_SUPER_BASE" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style=""]; "ReferenceCount" [URL="acron.core.ReferenceCount.html#acron.core.ReferenceCount",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "DTOOL_SUPER_BASE" -> "ReferenceCount" [arrowsize=0.75,style=""]; "TypedObject" [URL="acron.core.TypedObject.html#acron.core.TypedObject",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "DTOOL_SUPER_BASE" -> "TypedObject" [arrowsize=0.75,style=""]; "TypedWritable" [URL="acron.core.TypedWritable.html#acron.core.TypedWritable",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "TypedObject" -> "TypedWritable" [arrowsize=0.75,style=""]; "TypedWritableReferenceCount" [URL="acron.core.TypedWritableReferenceCount.html#acron.core.TypedWritableReferenceCount",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "TypedWritable" -> "TypedWritableReferenceCount" [arrowsize=0.75,style=""]; "ReferenceCount" -> "TypedWritableReferenceCount" [arrowsize=0.75,style=""]; }- CachedTypedWritableReferenceCount.cache_ref()¶
Explicitly increments the cache reference count and the normal reference count simultaneously.
- CachedTypedWritableReferenceCount.cache_unref()¶
Explicitly decrements the cache reference count and the normal reference count simultaneously.
The return value is true if the new reference count is nonzero, false if it is zero.
- CachedTypedWritableReferenceCount.get_cache_ref_count()¶
Returns the current reference count.
- static CachedTypedWritableReferenceCount.get_class_type()¶
- CachedTypedWritableReferenceCount.test_ref_count_integrity()¶
Does some easy checks to make sure that the reference count isn’t completely bogus.