Clean up intermediate Geometry objects immediately after creating octrees.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5351 127b21dd-08f5-0310-b4b7-95ae10353056
This commit is contained in:
parent
d37d178a3a
commit
38b0ad95ad
@ -661,13 +661,17 @@ static NSString *NormalModeDescription(OOMeshNormalMode mode)
|
||||
{
|
||||
if (octree == nil)
|
||||
{
|
||||
octree = [OOCacheManager octreeForModel:baseFile];
|
||||
octree = [[OOCacheManager octreeForModel:baseFile] retain];
|
||||
if (octree == nil)
|
||||
{
|
||||
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
|
||||
|
||||
octree = [[self geometry] findOctreeToDepth:[self octreeDepth]];
|
||||
[octree retain];
|
||||
[OOCacheManager setOctree:octree forModel:baseFile];
|
||||
|
||||
[pool release];
|
||||
}
|
||||
[octree retain];
|
||||
}
|
||||
|
||||
return octree;
|
||||
|
Loading…
x
Reference in New Issue
Block a user