[vlc-devel] CIL bindings and brain dump on LibVLC

Boris Dores babal at via.ecp.fr
Mon Oct 22 13:10:07 CEST 2007


On Mon, Oct 22, 2007 at 11:30:14AM (GMT+0200), Rémi Denis-Courmont wrote:
> I do use SafeHandle and IDisposable where appropriate.
> That's not the point.
> Neither IDisposable nor SafeHandle can warrant proper "release" ordering
> when one handle depends on another handle, because the GC itself does not.

  The point of IDisposable is to bypass the GC, so it's inability to
handle ordering is not a problem anymore. If the user calls Dispose()
on slave objects before master objects, everything is ok. Otherwise,
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.

  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.

-- 
Boris Dorès



More information about the vlc-devel mailing list