Re: Libical Dual License





On Mon, 18 Oct 1999, Miguel de Icaza wrote:

> 
> > Looking over the libical sources, I've found that it uses some internal
> > memory management routines (i.e. icalmemory.*).  Do we want to have
> > libical use glib routines, or continue to use the libical memory routines?
> 
> It would make sense to minimize the number of things the programmer
> needs to keep in mind if he is supposed to free the return values from
> libical.
> 

Actually, this is the entire reason for the libical memory management
routines. The libical client does not need to manage anything except the
memory returned by routines with "new" in the title. These are pimarily
for creating component, property, value and parameter objects. The client
does not have to worry about any strings or buffers. 

For the objects that you do worry about, you usually link them together
into a tree and only deal with the root. A large iCAL object may have this
containment structure: 

  component
    property
       parameter
       value
    property
       value 
    property
       value
    component 
       property
          value

The client only keeps track of the top level component, and all other
memory is managed by libical. 

Now, what does the glib memory management routines do? If you've got some
reference counting, garbage collection code or special, I may consider how
to hook it in. Otherwise, it it probably not necessary. 

eric. 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]