Graphics properties as objects
Michael Goffioul
michael.goffioul at gmail.com
Tue Jan 8 08:53:06 CST 2008
On 1/8/08, John W. Eaton <jwe at bevo.che.wisc.edu> wrote:
> On 8-Jan-2008, Michael Goffioul wrote:
>
> | On 1/8/08, John W. Eaton <jwe at bevo.che.wisc.edu> 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.
More information about the Octave-maintainers
mailing list