Manta Interactive Ray Tracer Development Mailing List

Text archives Help


[Manta] Re: Re: Re: Patch: remove Objects from Group


Chronological Thread 
  • From: Abe Stephens < >
  • To:
  • Cc: , Boonthanome Nouanesengsy < >
  • Subject: [Manta] Re: Re: Re: Patch: remove Objects from Group
  • Date: Tue, 8 Jul 2008 16:33:42 -0600
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=cc:message-id:from:to:in-reply-to:content-type :content-transfer-encoding:mime-version:subject:date:references :x-mailer; b=fCghVUFljpe6JKnYUtvKJHeQDfe1g7iR8dfKXDgl8VxD6W3ny3+ddAichVbg9Wuz44 jB1ZT1UpE/vv1aG58hrXRGMtbIdWxkW2fB9BLXbqWY2z05obNtJrb6cLzac0yVBKp1d8 kGvYt4ckStijEZfSgIQhiOsglCsDY/6Gb8KB0=

I committed some code (r2302) similar to what was in the patch. I added the flag which makes the method more similar to "Group::shrinkTo".

Ideally programmers shouldn't use the interface at this low level-- they should use a scene graph (...) or maybe vtk.

Abe

On Jul 8, 2008, at 4:15 PM, Steven G. Parker wrote:

Just add a flag to the remove do delete it (or not). That way the caller can have control over the memory policies.

Steve

On Jul 8, 2008, at 4:12 PM, Thiago Ize wrote:

I think the reason we didn't have this in the first place is that it could cause memory leaks since it doesn't also delete the object. Group however shouldn't delete the object, since the object might be used elsewhere. Doing it as specified in the patch would require that the programmer understand it's not really deleting the object and so they would need to do so themselves. The problem with that is that programmers might not realize that is the case. I'm not sure what the best way to handle this is, so I'm not saying this patch is good or bad. I just wanted to point out this possible problem. What do other people think should be done? Should we do it as this patch describes? Are there better ways to do it?

Thiago

Li-Ta Lo wrote:
Hi,

Can someone add this into the official tree? I am generating
and deleting Manta objects from VTK dynamically. It creates
memory leak if I can't remove old objects from the world group.


Boonth,

This is patch is what you need for the current vtkManta.

Ollie







Archive powered by MHonArc 2.6.16.

Top of page