Clear out original-to-copy mapping after creating copy so that we don't
prevent the last copy from being garbage collected. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4156 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -911,7 +911,9 @@ public class Model extends ModelNode
|
|||||||
public Spatial createCopy ()
|
public Spatial createCopy ()
|
||||||
{
|
{
|
||||||
random = RandomUtil.getInt(Integer.MAX_VALUE);
|
random = RandomUtil.getInt(Integer.MAX_VALUE);
|
||||||
return super.createCopy();
|
Spatial copy = super.createCopy();
|
||||||
|
originalToCopy.clear(); // make sure no references remain
|
||||||
|
return copy;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user