]> git.lyx.org Git - features.git/commitdiff
Surely we do not need to clear objects that are about to be destroyed
authorRichard Kimberly Heck <rikiheck@lyx.org>
Mon, 9 Nov 2020 21:37:18 +0000 (16:37 -0500)
committerRichard Kimberly Heck <rikiheck@lyx.org>
Wed, 11 Nov 2020 17:07:56 +0000 (12:07 -0500)
(cherry picked from commit efe55ba6a700ed9eec836d9bc23fd5756cfdcd47)

src/Buffer.cpp

index bcba8d2503391a2117d9571064fae62f08a90f4f..7e72619a4ce252e825dcdd034ed0d811e560f37c 100644 (file)
@@ -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())));