OverviewFilesCommitsIssuesDocsReleasesPeers

opencog-atomspace commits / 3a59828

Blank out the AtomSpace pointer after finishing with it.
3a598288abf5046cd0ccff06232e51c9efb901ca
by Linas Vepštas <linasvepstas@gmail.com> · 2026-01-21T08:12:22.000Z

Changed files (1) +9 -0

opencog/atomspace/AtomSpace.cc +9 -0
……@@ -175,6 +175,15 @@ void AtomSpace::install(void)
175175 Handle llc(get_handle());
176176 for (const AtomSpacePtr& has : _environ)
177177 has->insert_atom(llc);
178
179 // Avoid a minor(?) amount of confusion by blanking the _atom_space
180 // pointer. A non-null pointer was required, so that the above exec
181 // could happen. But now that it has happened, we do not want to track
182 // this any longer. Our parents are being held in the _environ vector
183 // and not by this pointer.So kill it before someone else notices
184 // that it is not null, and decides to use it for some nefarious
185 // underhanded covert operation. Someone like Abbe Dala Pikola...
186 _atom_space = nullptr;
178187}
179188
180189void AtomSpace::remove(void)