public inbox for guile-gtk@sourceware.org
 help / color / mirror / Atom feed
From: Marko Rauhamaa <marko@pacujo.net>
To: guile-gtk@sources.redhat.com
Subject: Re: Introduced destructors and finalized GdkCursor
Date: Wed, 14 May 2003 01:17:00 -0000	[thread overview]
Message-ID: <m3smriibbx.fsf@lumo.pacujo.net> (raw)
In-Reply-To: <m3ptmso2vo.fsf@lumo.pacujo.net>

Marko Rauhamaa <marko@pacujo.net>:

> Summary: Introduced destructors and finalized GdkCursor.
> 
> Details:
> 
>  - build-guile-gtk-1.2: The defs files didn't specify destructors.
>    Instead, the garbage collector was trusted to release resources. This
>    is the right strategy as long as the resource is a piece of client
>    RAM. However, we must release X server resources as soon as they are
>    no longer needed.
> 
>    I have now introduced a new option for define-boxed and
>    define-struct: (physical #t). When set, the function specified in the
>    free option becomes callable from guile code. The proxy object stays
>    alive, but any reference to it causes an assertion to fail.
> 
>  - gdk-1.2.defs: As a first application of destructors, I added the
>    (physical #t) option to GdkCursor.

In light of my recent revelation regarding the design of the boxed
types, I have to backtrack from this scheme and take out the whole
"physical" thing.

Theoretically, the problem is real -- you could design an application
that forces the X server to store a large number of unused resources.
However,

  1. There is no way to fix the problem.

  2. In practice, the problem is not likely get bad since the main case,
     GdkWindow, happens to have the right kind of destructor
     (gdk_window_destroy).


Here's the reason for my confusion: I thought there was a one-to-one
mapping between the boxed smobs and GDK objects. It turns out multiple
smobs can share the same GDK object, and that design cannot be changed.


Marko

-- 
Marko Rauhamaa      mailto:marko@pacujo.net     http://pacujo.net/marko/

      parent reply	other threads:[~2003-05-14  1:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-09 10:09 Marko Rauhamaa
2003-05-11 23:35 ` Kevin Ryde
2003-05-12  0:11   ` Marko Rauhamaa
2003-05-12  0:25     ` Kevin Ryde
2003-05-14  1:17 ` Marko Rauhamaa [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3smriibbx.fsf@lumo.pacujo.net \
    --to=marko@pacujo.net \
    --cc=guile-gtk@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).