[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Graphics properties as objects
From: |
John W. Eaton |
Subject: |
Re: Graphics properties as objects |
Date: |
Sat, 05 Jan 2008 21:07:57 -0500 |
On 5-Jan-2008, Michael Goffioul wrote:
| On 1/5/08, John W. Eaton <address@hidden> wrote:
| > Is it even necessary to have the base class do reference counting
| > here?
| >
| > Since the properties are tied to the graphics objects that contain
| > them, shouldn't we only expect them to exist as long as the graphics
| > object exists?
| >
| > If individual properties do need to exist longer than the graphics
| > objects that contain them, then wouldn't it be sufficient to simply
| > have a copy of the property? Aren't most (all) of the property
| > classes composed of objects that are already reference counted? So
| > copying them should be relatively cheap and since they are passed
| > around by value, they should not be deleted unnecessarily?
|
| I'm not sure I fully understand you. I agree with copying properties
| instead of const-referencing. However, if you want to have a map of
| all properties, how would you define it? std::map<caseless_str, XXX>?
| If XXX is "property" and you don't do reference couting, you will get
| a memory leak with dynamic properties (that wil only be stored in the
| map). Or maybe you mean simply to disable "somehow" reference
| counting for fixed properties?
Maybe I'm missing something fundamental, but I don't understand why
there would be a memory leak if the map contains values. Can you give
a simple example that shows why that would happen?
jwe
- Re: Graphics properties as objects, (continued)
- Re: Graphics properties as objects, Michael Goffioul, 2008/01/04
- Re: Graphics properties as objects, John W. Eaton, 2008/01/04
- Re: Graphics properties as objects, Michael Goffioul, 2008/01/04
- Re: Graphics properties as objects, John W. Eaton, 2008/01/05
- Re: Graphics properties as objects, Shai Ayal, 2008/01/05
- Re: Graphics properties as objects, John W. Eaton, 2008/01/05
- Re: Graphics properties as objects, Shai Ayal, 2008/01/05
- Re: Graphics properties as objects, Michael Goffioul, 2008/01/05
- Re: Graphics properties as objects, John Swensen, 2008/01/05
- Re: Graphics properties as objects, John W. Eaton, 2008/01/05
- Re: Graphics properties as objects,
John W. Eaton <=
- Re: Graphics properties as objects, Michael Goffioul, 2008/01/06
- Re: Graphics properties as objects, John W. Eaton, 2008/01/06
- Re: Graphics properties as objects, Michael Goffioul, 2008/01/06
- Re: Graphics properties as objects, Michael Goffioul, 2008/01/08
- Re: Graphics properties as objects, John W. Eaton, 2008/01/08
- Re: Graphics properties as objects, Michael Goffioul, 2008/01/08
- Re: Graphics properties as objects, Shai Ayal, 2008/01/08
- Re: Graphics properties as objects, Michael Goffioul, 2008/01/08
- Re: Graphics properties as objects, John W. Eaton, 2008/01/08
- Re: Graphics properties as objects, Michael Goffioul, 2008/01/08