🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.x
Article #24195

Re: Xt Resource Cache Counting

#24195
From: Ralph Swick
Date: Fri, 28 Jun 1991 12:19
17 lines
1243 bytes
> Xt adds a XtNdestroyCallback to the widget to decrement the
> resource's reference count and free the cached resource if zero.
> Right?

Right, in general.  If the resource happens to already exist (i.e.
this is not the first reference) and if a previous reference was
marked as initialResourcesPersistent:True, then no reference counting
is done and no callback is added.  InitialResourcesPersistent is
described with XtConvertAndStore (page 800 of the Digital Press book)
but it must actually be specified when objects are created; i.e.
with XtCreateWidget.

> To use the same color for a second widget, I must then call
> XtConvertAndStore again if I want to properly maintain the
> resource cache count.  Correct?

Correct.
Technical Details
Message-ID: <1991Jun28.121922.20120@crl.dec.com>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!elroy.jpl.nasa.gov!decwrl!deccrl!news.crl.dec.com!swick
References: <1991Jun27.213802.28113@infonode.ingr.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!elroy.jpl.nasa.gov!decwrl!deccrl!news.crl.dec.com!swick
From: swick@crl.dec.com (Ralph Swick)
Newsgroups: comp.windows.x
Subject: Re: Xt Resource Cache Counting
Keywords: Xt resources
Message-ID: <1991Jun28.121922.20120@crl.dec.com>
Date: 28 Jun 91 12:19:22 GMT
References: <1991Jun27.213802.28113@infonode.ingr.com>
Sender: news@crl.dec.com (USENET News System)
Organization: DEC Cambridge Research Lab
Lines: 17