[Gtk-sharp-list] Pre-release, Gtk# 0.6
09 Dec 2002 23:52:42 -0600
On Mon, 2002-12-09 at 23:00, Gonzalo Paniagua Javier wrote:
> Should i commit the Log.cs file (wraps logging functions and can make
> life easier when debugging warning/error/critical from C libraries)? (i
> sent it a week ago or so)
I see Mike has already approved it, but I have some additional
* IntPtr data isn't generally useful for .NET delegates, because
delegates support closures automatically for instance methods. I would
suggest you remove the user_data parameter in the methods, and just pass
in IntPtr.Zero. Even better would be to map between a .NET delegate and
a native-type delegate. The generator currently does this for the
various callback funcs, it would be easy to copy what it does.
* Delegate function pointers are only pinned for the duration of a
PInvoke call. If you are setting a handler, you need to keep the GC from
getting at the delegate you passed to C. The current solution used by
the generator is explicitly keeping a reference in a static hash table.
It's suboptimal, but works well enough for now.
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org
-----END PGP SIGNATURE-----