Re: Static class instances possible?
- From: Havoc Pennington <hp redhat com>
- To: Tommi Komulainen <tkomulai gmail com>
- Cc: gtk-devel-list gnome org
- Subject: Re: Static class instances possible?
- Date: Fri, 18 Feb 2005 14:28:53 -0500
On Fri, 2005-02-18 at 10:11 +0200, Tommi Komulainen wrote:
> As I've understood it currently all glib class instances are
> dynamically built the first time an instance is needed. On a resource
> limited device this contributes to slow application startup and I was
> wondering if it would be possible during compilation to somehow
> pre-build some class instances and have them in static (const?)
> memory?
It isn't possible with how gobject works, because the class_init() is
called for each superclass from GObject down to your subclass, and this
creates the inheritance (virtual functions in the superclass are filled
in by the superclass's class_init()). There's no way to get this
information statically.
I doubt this shows up much in GTK's startup time, though...
Havoc
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]