[vlc-devel] CIL bindings and brain dump on LibVLC
rdenis at simphalempin.com
Mon Oct 22 14:35:10 CEST 2007
On Mon, 22 Oct 2007 13:10:07 +0200, Boris Dores <babal at via.ecp.fr> wrote:
> slave objects will throw when trying to use a released master object,
> but that's ok because it is the responsibility of the user to call
> IDisposable appropriately.
I wish it was that simple... Unfortunately, it will not throw - a managed
exception. It triggers a native segmentation fault or something along
these line and unrecoverably crash the CLR process, because the problem
occurs in native code.
Sure, the managed wrapper should protect the unmanaged code, and prevent
the managed code from doing undefined unmanaged operations. Alas, taking
such things as multiple CLR threads, and other such funny as managed
thread cancellation, makes this pretty difficult, if at all possible.
> But once again, I don't disagree with the fact that correcting libvlc
> to not require an IDisposable is the best solution. I was only
> mentionning technical possibilities.
More information about the vlc-devel