Closed lawrancej closed 12 years ago
I got this one too
It works now. I commented on your pull request for a different issue about this. http://blogs.gnome.org/xclaesse/2010/02/11/how-to-make-a-gobject-singleton/
Before closing this issue, I'll need to see: a test in tests/empty-set-test.c
to verify when you call compilerkit_empty_set_get_instance
twice, the pointers are the same. You're almost done.
Hey Kyle, I'll go ahead and write the test case for this. I'm on a test case writing binge at the moment.
3e4bc8ef65e35640790fdc347a4 closes this issue.
EmptySet currently allows multiple instances, which is wasteful of space. We only need one instance of emptyset.
compilerkit_empty_set_new
so that it statically allocates a single instance of that object, which it returns.compilerkit_empty_set_dispose
so that it doesn't bother to deallocate the instance.