]> 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>
Mon, 9 Nov 2020 21:37:18 +0000 (16:37 -0500)
src/Buffer.cpp

index 66654516d379cfe1627b14ff79ef9778280279ed..600d81090cc6e3761e8f4891bf1116aba2e7aaed 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())));