re-enable ref cleaning with changes
This commit is contained in:
parent
52f6f40034
commit
03bf0eae77
1 changed files with 15 additions and 8 deletions
|
|
@ -405,20 +405,27 @@ async function sliceZ(z, points, options = {}) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// free objects to be re-claimed and reduce memory pressure
|
// free objects to be re-claimed and reduce memory pressure
|
||||||
if (false) {
|
if (true) {
|
||||||
delete rval.groups
|
delete rval.groups
|
||||||
delete rval.lines
|
delete rval.lines
|
||||||
delete rval.clip.m_AllPolys
|
|
||||||
|
|
||||||
|
if (rval.tops)
|
||||||
for (let top of rval.tops) {
|
for (let top of rval.tops) {
|
||||||
top.poly.freeParentRefs();
|
if (top.poly) {
|
||||||
top.simple.freeParentRefs();
|
top.poly.freeParentRefs();
|
||||||
for (let shell of top.shells) shell.freeParentRefs();
|
top.simple.freeParentRefs();
|
||||||
for (let fillo of top.fill_off) fillo.freeParentRefs();
|
for (let shell of top.shells) shell.freeParentRefs();
|
||||||
for (let last of top.last) last.freeParentRefs();
|
for (let fillo of top.fill_off) fillo.freeParentRefs();
|
||||||
|
for (let last of top.last) last.freeParentRefs();
|
||||||
|
} else {
|
||||||
|
top.freeParentRefs();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (let clip of rval.clip) clip.freeParentRefs();
|
if (rval.clip) {
|
||||||
|
for (let clip of rval.clip) clip.freeParentRefs();
|
||||||
|
if (rval.clip.m_AllPolys) delete rval.clip.m_AllPolys
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (each) each(rval);
|
if (each) each(rval);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue