.net - Handling Graphs of Managed Object Proxies to Unmanaged Objects -
My question is similar:
But with a twist.
I have essentially an object graph or a hierarchy, where the owner of some references to several instances of class I have a managed representation of The Code> Proxy works the same way (actual When the original What's the best way to deal with this scenario - as I do not have to capture the Maybe I'm more superficially over this, but your Foo class
bar / P>
Foo in .NET, which places
IntPtr on the actual
Foo and P / Use ions to call methods on
foo (working as a proxy).
Foo (Proxy)
IDisposable .
list for
foo in
bar for
IntPtr ).
foo is released, it issues all its children (including all the
times s).
Foo proxy's managed client's reference to
bar They want to keep it long and in the context of the
Foo proxy.
bar (proxy) There should be a
disposable method in class which is called by the parent / owner
Foo class and like many classes, once the
bar objects If it has been settled, then it should set an internal
m_disposed flag correctly and any exception should be given to the
ObjectDisposed followed by the methods Is used If your internal unmanaged resources have been cleaned in the context of your managed
bar object, then you do not care needed.
Comments
Post a Comment