Delivered-To: garrigue at math.nagoya-u.ac.jp Authentication-Results: mailhost.math.nagoya-u.ac.jp sender=lablgtk-bounces at yquem.inria.fr; domainkey=neutral (no query protocol specified; no policy for yquem.inria.fr) Delivered-To: lablgtk at yquem.inria.fr DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:subject:from:to:content-type :date:message-id:mime-version:x-mailer:content-transfer-encoding; bh=pbciDfty9nfFdWmO9SMXWAlsUmLeXrQA+U5f4s9LKX0=; b=hB3A9Fq/3GEtiywe8+wK2rgCs66ioIpmwatgBE2C/4dy05tKh35E5LvZ7fcXV/1zb6 C+Eq5xyzQcv7Zs2FF3J/1i0iqERiKy/WNCkXsPWJ2YiT5eof6EJdeGwIxBeUFV8aw90W /oHxpUVh+Ek8sP3Q9EoMZ+zaGVIY5cG8FNung= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:from:to:content-type:date:message-id:mime-version:x-mailer :content-transfer-encoding; b=NNC8rYrSVieRC+0aPbl2NJp+R0fZBT+yJjdsfFytu4V5pDGudIrhu7n/TqhrerCwdI vD4b4DRaBigTl/dEov7/nO0/586Cb6BSfZMRlDMZn128Gzw6rBtuTU1NH9jaPz/pyLxU RzGnFvS2tb47WAd8NkAdRosbuwV/rMszxMfnc= From: Edouard To: lablgtk at yquem.inria.fr Content-Type: text/plain Date: Thu, 24 Sep 2009 07:52:53 +0200 Message-Id: <1253771573.5290.2.camel at edouard-laptop> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [Lablgtk] Reference counting and LablGTK Hello, I'm writting an application which loads some symbol tables at startup. Symbol tables are GtkTable widgets with many GtkButton inside. Each GtkButton displays a symbol (PNG file). The application currently have 8 symbol tables; as a result, the whole loading time is quite long (about one third of the whole loading time). Symbol tables are stored in a hash table and always displayed one by one (the previously shown symbol table is removed from its container (GtkScrolledWindow), then replaced by the new one). One way to reduce loading time is using OCaml lazy features. Symbol table are thus loaded when needed, and not necessarily at startup. But this results in a totally unexpected behavior. The first time the symbol table is displayed in the scrolled window, everything works well. But the next times, every GtkButton have disappeared. Maybe it is a reference counting related problem. So is there a way to manually manipulate ref values in LablGTK (I know there is a dedicated function in GTK, gtk_widget_ref, but was it wrapped for OCaml) ? Or maybe there is a workaround to avoid using this function. Thank you in advance for your help. Best regards, Edouard _______________________________________________ Lablgtk mailing list Lablgtk@yquem.inria.fr http://yquem.inria.fr/cgi-bin/mailman/listinfo/lablgtk