-
Notifications
You must be signed in to change notification settings - Fork 127
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[COMPOSIT] Extend the AddRef to return the *type* of reference counti… (
#1510) * [COMPOSIT] Extend the AddRef to return the *type* of reference counting is applicable. Sometimes an object is reference counted but it is owned (composit) of a larger (COM)object. Than the reference count is just for tracking correct programming and not specifically for determining the lifetime object (In release the reference count can even be dropepd for these objects) The SinkType<> template is such an object. It is always *part* of a bigger (COM)object and thus it is by design that the lifetime of the SinkType<> object is always equasl to (and *not* extending) the lifetime of the object owning the SinkType<> member. Typically its parent and typically also a Refernce counted object. The rationale behind this is to use the SinkType<> template where possible as it uses less resources (no *additional* new for allocation, and in release builds not even a _referenceCounter member). However, make sure that the lifetime of the SinkType<> member is always smaller or equal to the lifetime of the owning object! In R4 the Non-HappyDay scenarios where considered in the Thunder Framework to avoid object leakage without nothering the plugin developper. This means that if an out-of-process plugin would crash, and during its lifetime took some references on objects living in the parent process, the ThunderFrameowrk would, under the hood, automatically Release these taken refernces on behalf of the crashed child process. Thois would make sure that even if the Child process would crash, resources held in the parent process would still be properly released, if, for example, the plugin would be deactivated. However for COmposit plugins this could lead to a race condition. This cleaning up is typically done on idle time of the framework but if the composit (SinkType<> template) was to be destructed already as that lifetime of the owning object was already over the "under-the-hood" framework cleanu systm for crashing plugins would call into a dead object. This PR is now indicating that an Object is actually an COM reference counted object, owned by another object and thus and thus does not require the non-happy day Releasing on behalf of crashing processes. I theory a crashing process is now nolonger Release Composit Reference counted objects and might potentially lead to warning in the log but no leakages for real reference counted objects. * Update Administrator.h
- Loading branch information
Showing
16 changed files
with
73 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters