Re: [Vala] Implementing Singleton
- From: Cem Eliguzel <celiguzel ubicom com>
- To: vala-list gnome org
- Subject: Re: [Vala] Implementing Singleton
- Date: Mon, 4 Jan 2010 15:02:13 +0200
Hello,
I have the following simple singleton implementation:
public class Singleton<T> : Object {
private static T instance_;
public static T instance() {
if (instance_ == null) {
instance_ = new T();
}
return instance_;
}
}
and I get the following error during compilation:
error: `Singleton.T' is not a class, struct, or error code
Wat is the point I'm missing?
Regards,
Cem
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]