summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/buildstream/_project.py8
-rw-r--r--src/buildstream/_stream.py4
-rw-r--r--src/buildstream/element.py3
3 files changed, 3 insertions, 12 deletions
diff --git a/src/buildstream/_project.py b/src/buildstream/_project.py
index 180c23977..fd4a44732 100644
--- a/src/buildstream/_project.py
+++ b/src/buildstream/_project.py
@@ -485,14 +485,6 @@ class Project:
self._load_second_pass()
- # cleanup()
- #
- # Cleans up resources used loading elements
- #
- def cleanup(self):
- # Reset the element loader state
- Element._reset_load_state()
-
# get_default_target()
#
# Attempts to interpret which element the user intended to run a command on.
diff --git a/src/buildstream/_stream.py b/src/buildstream/_stream.py
index 222957c02..fc5b15211 100644
--- a/src/buildstream/_stream.py
+++ b/src/buildstream/_stream.py
@@ -111,8 +111,8 @@ class Stream:
# Cleans up application state
#
def cleanup(self):
- if self._project:
- self._project.cleanup()
+ # Reset the element loader state
+ Element._reset_load_state()
# set_project()
#
diff --git a/src/buildstream/element.py b/src/buildstream/element.py
index efec5e714..3ac201d66 100644
--- a/src/buildstream/element.py
+++ b/src/buildstream/element.py
@@ -1194,8 +1194,7 @@ class Element(Plugin):
# _reset_load_state()
#
- # This is called by Pipeline.cleanup() and is used to
- # reset the loader state between multiple sessions.
+ # This is used to reset the loader state across multiple load sessions.
#
@classmethod
def _reset_load_state(cls):