2003-11-28 Miguel de Icaza <miguel@ximian.com>
* Mono.Cairo/Object.cs:
* Mono.Cairo/Surface.cs (LookupSurface): New method, it took me a
while to find out why Cairo applications would crash sometimes.
The problem was that Cairo.Object:TargetSurface get property would
create a Surface from an IntPtr, leading to having two managed
objects owning the same unmanaged Surface.
(Surface..ctor): Make private, so only this module can create
surfaces.
(Surface.Dispose): Add disposable pattern, finalizer.
* Mono.Cairo/Object.cs: Add disposable pattern, finalizer.
svn path=/trunk/mcs/; revision=20606