From: Richard Kimberly Heck Date: Mon, 9 Nov 2020 21:37:18 +0000 (-0500) Subject: Surely we do not need to clear objects that are about to be destroyed X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=65d92093285cf06c7d7bfc8c6a0ded687aa42ce6;p=features.git Surely we do not need to clear objects that are about to be destroyed (cherry picked from commit efe55ba6a700ed9eec836d9bc23fd5756cfdcd47) --- diff --git a/src/Buffer.cpp b/src/Buffer.cpp index bcba8d2503..7e72619a4c 100644 --- a/src/Buffer.cpp +++ b/src/Buffer.cpp @@ -557,10 +557,6 @@ Buffer::~Buffer() } else cloned_buffers.erase(it); } - // FIXME Do we really need to do this right before we delete d? - // clear references to children in macro tables - d->children_positions.clear(); - d->position_to_children.clear(); } else { // loop over children for (auto const & p : d->children_positions) { @@ -583,11 +579,6 @@ Buffer::~Buffer() Alert::warning(_("Attempting to close changed document!"), msg); } - // FIXME Do we really need to do this right before we delete d? - // clear references to children in macro tables - d->children_positions.clear(); - d->position_to_children.clear(); - if (!d->temppath.destroyDirectory()) { LYXERR0(bformat(_("Could not remove the temporary directory %1$s"), from_utf8(d->temppath.absFileName())));