[Mono-list] 'GLib.Object.Data' is obsolete

Bryan Buchanan bryanb at webbtide.com
Fri Jul 1 03:39:42 EDT 2005


I've been using this syntax:

entry.Data["bad_value"] = true;

to store arbitrary data in an object (ala the Gtk C way). When compiling
against the 2.0 glib-sharp dll, the compiler gives the warning:

warning CS0618: 'GLib.Object.Data' is obsolete: 'Can cause instability
due to garbage collection of GLib.Objects.'

Is there some other way, without extending the object class, to store
arbitrary data in an abject ?



More information about the Mono-list mailing list