octave-maintainers
[Top][All Lists]
Advanced

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

Re: Graphics properties as objects


From: Michael Goffioul
Subject: Re: Graphics properties as objects
Date: Tue, 8 Jan 2008 15:53:06 +0100

On 1/8/08, John W. Eaton <address@hidden> wrote:
> On  8-Jan-2008, Michael Goffioul wrote:
>
> | On 1/8/08, John W. Eaton <address@hidden> wrote:
> |
> | > I'm surprised to see the property argument above not be a reference or
> | > pointer.  Doesn't this cause a copy to be made when insert_property is
> | > called?
> |
> | It just increases the reference counting of the underlying base_property
> | object.
>
> But won't the count be decremented again when the destructor for the
> local value in the insert_property function is called when the end of
> the function is reached?

Yes, but in the meantime, you'll have another reference stored in the
map. So the internal object will not be deleted.

Michael.


reply via email to

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