Andre Poenitz wrote:
On Thu, Mar 06, 2008 at 02:52:47PM -0500, rgheck wrote:
Does anyone know why these are boost::shared_ptrs?

I was wondering myself several times...

Maybe it was ment to save memory in the times when we had more or less
static document classes.

I think that must have been the point. But now that we have dynamic ones, this shared_ptr will cause problems.

Just make sure "everything" still works ;-)

As far as I can see, a new FloatList and Counter object are constructed every time a new TextClass is constructed---except, of course, on copying or assignment. In that case, the new TextClass would get a pointer to the old TextClass's FloatList and Counter. But that just seems wrong.

There shouldn't be any problem

rh

Reply via email to