[Top][All Lists]

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

Re: [bug-mailutils] Merging libraries (was Re: Mailutils 0.3

From: Alain Magloire
Subject: Re: [bug-mailutils] Merging libraries (was Re: Mailutils 0.3
Date: Mon, 24 Feb 2003 10:31:28 -0500 (EST)

> > 
> > 1) mailbox_get_message retrieves a pointer to the data allocated under
> > mailbox_t.
> > 
> > 2) Calling mailbox_get_message(mbox, 2, &msg) several times is not an
> > error and does not result in allocating more memory. It only
> > increments the reference count associated with `msg'.
> > 
> > 3) Calling message_destroy(&msg) decrements the reference count. If
> > the count falls to zero, it frees all allocated resources and notifies
> > the owner object (mailbox_t) about the fact. Subsequent invocation of
> > mailbox_get_message results in allocating new object for that message.
> > 
> > Does this sound reasonable?
> Yes.

I've put in a very quick thread-safe refcount code, but did not
attemp to change the code.

I'm assuming that we want to do changes in phases and get code in
working shape after each major change/phase.

Any suggestion on a clean way to do this?

reply via email to

[Prev in Thread] Current Thread [Next in Thread]