Index: [thread] [date] [subject] [author]
  From: Marcus Sundberg <mackan@stacken.kth.se>
  To  : ggi-develop@eskimo.com
  Date: Sat, 17 Jul 1999 16:54:55 +0200

Re: Extensions

> Kien Pham writes:
> 
> >  O.K. I have clarity now.
> >  My exact question is what exactly is the point of
> >  allowing extensions to Attach() to visuals multiple times
> >  when all this does is increment a counter.

If it makes you happier I can disallow just you to attach
extensions multiple times...

> >  This is relevent because my extension needs to initialize
> >  data the first time it is Attach()ed to a visual.
> >  calls to my function will cause it to check the return
> >  value of Attach()ed to see if the data is already
> >  initialized. After this, I have two options. One is to
> >  immediately Detach() if the return value is greater than 1
> >  and the other is to "unwind" all Detach()es at the end of
> >  the program. I find this a bit cumbersome. If I don't
> >  properly Detach(), the data will never be free()ed.

I still can't see the problem here. Look at how libedemo manages
private data, and then tell me in what way your extension has so
much different requirements.

//Marcus
-- 
-------------------------------+------------------------------------
        Marcus Sundberg        | http://www.stacken.kth.se/~mackan
 Royal Institute of Technology |       Phone: +46 707 295404
       Stockholm, Sweden       |   E-Mail: mackan@stacken.kth.se

Index: [thread] [date] [subject] [author]