On Wed, Oct 29, 2008 at 6:28 AM, "José D. Abad"
<granveoduendes gmail com> wrote:
I used the singleton pattern. For now it has worked.
My question is: How can I make it//// thread-safe with Glib?
________________
using GLib;
public class CSingleton : Object
{
private static CSingleton Instance = null;
private static void CreateInstance ()
{
if (Instance == null)
{
Instance = new CSingleton ();
}
}
public static CEscena Get_Instance ()
{
if (Instance == null) CreateInstance ();
return Instance;
}
}
________________
......
CSingleton singleton = Get_Instance ();
________________
_______________________________________________
Vala-list mailing list
Vala-list gnome org
http://mail.gnome.org/mailman/listinfo/vala-list