Class-Scope Properties
- From: Eric Lemings <eric b lemings lmco com>
- To: gtk-app-devel-list gnome org
- Cc: timj gtk org
- Subject: Class-Scope Properties
- Date: Wed, 19 Sep 2001 10:48:48 -0600
Hello all,
I believe I've asked this question before but never got a definitive
answer.
Say you're creating a new class A derived from GObject. This class
needs a property that has class scope; a.k.a, static scope in C++
classes. In addition, this property is no simple built-in or
fundamental value but is itself an instance of another class B derived
from GObject. Now, I'm fairly sure you would create the new instance of
the class B property in the class_init function for class A.
But where do you release it? As far as I can tell, the finalize_class
function is only for plug-ins. And debug_objects is reporting the
property as a stale reference when the program exits.
Thanks,
Eric.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]