This is the base class for those of our classes that are backed by std.shared_ptr.
More...
Inheritance diagram for MR.Misc.SharedObject< T >:Properties | |
| override bool | _IsOwning [get] |
This checks if the shared_ptr itself is owning or not, rather than whether we own our shared_ptr, which isn't a given. The derived classes have to implement this, since it depends on the specific shared_ptr type. | |
| bool | _IsOwningSharedPtr [get] |
This checks if we own the underlying shared_ptr instance, regardless of whether it owns the underlying object, which is orthogonal. We repurpose _IsOwningVal for this. | |
Properties inherited from MR.Misc.Object< T > | |
| virtual bool | _IsOwning [get] |
| Returns true if this is an owning instance, and when disposed, will destroy the underlying C++ instance. If false, we assume that the underlying C++ instance will live long enough. | |
Additional Inherited Members | |
Public Member Functions inherited from MR.Misc.KeepAliveHolder< T > | |
| void | _KeepAlive (object obj, string key="") |
Keeps obj alive as long as this object exists. If key is specified, it's an optional tag for this object. | |
| void | _DiscardKeepAlive (string key="") |
Discards the objects kept alive by this object. If key is not empty, only discards the objects with the same key. Otherwise discards all of them. This intentionally doesn't discard _KeepAliveEnclosingObject. | |
Static Public Member Functions inherited from MR.Misc.KeepAliveHolder< T > | |
| static void | _StaticKeepAlive (object obj, string key="") |
| static void | _StaticDiscardKeepAlive (string key="") |
Public Attributes inherited from MR.Misc.KeepAliveHolder< T > | |
| object? | _KeepAliveEnclosingObject = null |
| A special holder for the enclosing object when returning a reference to its subobject. | |
Protected Attributes inherited from MR.Misc.Object< T > | |
| bool | _IsOwningVal |
This is the base class for those of our classes that are backed by std.shared_ptr.