Mantis - Croquet
Viewing Issue Advanced Details
5797 Hedgehog minor always 01-20-07 20:06 02-01-07 04:13
howardstearns  
 
normal  
new  
open  
none    
none  
0005797: Cube and Laser objects create permanent TMaterial garbage
Some classes create TMaterials that are immediately thrown away. This creates a lot of garbage that permanently inflates the size of the island, making sync take longer and longer. With no handles to these objects, there's no way for an application to explicitly "free" them.

- TLaser>>initialize creates 4 TTriangles and 4 TRectangles that each have their own TMaterial. It then immediately replaces these 8 TMaterials with two new ones. (A new TLaser is created for each entering user, so this adds up in a long-lived island.)

- TCube new creates a TMaterial that is eventually assigned to the new instance via TMesh>>quadMeshWithVertices:alias:norms:textureUV:faceGroups:material:. However, TCube>>initialize also creates a TMaterial which will immediately be replaced by the one from #new.
child of 0003297confirmed  island export and nameMap tables filling up 
 UnregisterLaser.1.cs.gz [^] (621 bytes) 02-01-07 04:11

Notes
(0009316)
howardstearns   
02-01-07 04:13   
The attached UnregisterLaser changeset "fixes" the TLaser problem by expicitly unregistering the junk TMaterial. But this depends on having #unregister:, which is only otherwise used in the Wisconsin package, so it's probably not a fix for everyone.