[Gtk-sharp-list] Cairo context disposing pattern
pinggi at centrum.cz
pinggi at centrum.cz
Sat Apr 21 15:46:47 UTC 2012
Hi,
I encountered one strangeness:
Cairo.Context ctx = new Cairo.Context(cairoImageSurface);
((IDisposable)ctx).Dispose();
Why I need to cast cairo context to IDisposable to be able to call Dispose method?
What is the reason, because I would expect something like this:
Cairo.Context ctx = new Cairo.Context(cairoImageSurface);
ctx.Dispose();
[pinggi]
More information about the Gtk-sharp-list
mailing list