memorymanagement 1.1.4__tar.gz → 1.1.5__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {memorymanagement-1.1.4 → memorymanagement-1.1.5}/PKG-INFO +1 -1
- {memorymanagement-1.1.4 → memorymanagement-1.1.5}/memorymanagement/cleaning/core.py +7 -2
- {memorymanagement-1.1.4 → memorymanagement-1.1.5}/memorymanagement.egg-info/PKG-INFO +1 -1
- {memorymanagement-1.1.4 → memorymanagement-1.1.5}/setup.cfg +1 -1
- {memorymanagement-1.1.4 → memorymanagement-1.1.5}/LICENSE +0 -0
- {memorymanagement-1.1.4 → memorymanagement-1.1.5}/README.md +0 -0
- {memorymanagement-1.1.4 → memorymanagement-1.1.5}/memorymanagement/__init__.py +0 -0
- {memorymanagement-1.1.4 → memorymanagement-1.1.5}/memorymanagement/cleaning/__init__.py +0 -0
- {memorymanagement-1.1.4 → memorymanagement-1.1.5}/memorymanagement/pointers/__init__.py +0 -0
- {memorymanagement-1.1.4 → memorymanagement-1.1.5}/memorymanagement/pointers/core.py +0 -0
- {memorymanagement-1.1.4 → memorymanagement-1.1.5}/memorymanagement/pointers/decorators.py +0 -0
- {memorymanagement-1.1.4 → memorymanagement-1.1.5}/memorymanagement.egg-info/SOURCES.txt +0 -0
- {memorymanagement-1.1.4 → memorymanagement-1.1.5}/memorymanagement.egg-info/dependency_links.txt +0 -0
- {memorymanagement-1.1.4 → memorymanagement-1.1.5}/memorymanagement.egg-info/top_level.txt +0 -0
- {memorymanagement-1.1.4 → memorymanagement-1.1.5}/pyproject.toml +0 -0
|
@@ -19,6 +19,7 @@ class Cleaner:
|
|
|
19
19
|
These mainly are variables needed for the system to work and imports.
|
|
20
20
|
_excluded (`list[str]`, Hidden): List of variables excluded from the memory cleaning that can be included again if desired.
|
|
21
21
|
_flagged (`list[str]`, Hidden): List of variables to erase from memory. Variables can be put in and/or taken out through methods.
|
|
22
|
+
_name (`str`, Hidden): Name of the variable referencing the `Cleaner` object. Only for internal purposes.
|
|
22
23
|
---
|
|
23
24
|
|
|
24
25
|
## Methods
|
|
@@ -61,6 +62,7 @@ class Cleaner:
|
|
|
61
62
|
self._not_delete=not_delete.copy()
|
|
62
63
|
self._excluded=excluded.copy()
|
|
63
64
|
self._flagged=flagged.copy()
|
|
65
|
+
self._name=None
|
|
64
66
|
def update(self,exclude:str|list[str]|tuple[str]|None=None,include:str|list[str]|tuple[str]|None=None):
|
|
65
67
|
"""
|
|
66
68
|
Flags all the new global variables' references that were not manually excluded here or before. You can also include previously excluded references.
|
|
@@ -85,8 +87,11 @@ class Cleaner:
|
|
|
85
87
|
self._flagged=[var for var in list(vars(modules["__main__"]))if var not in self.not_delete and var not in self.excluded]
|
|
86
88
|
@property
|
|
87
89
|
def not_delete(self):
|
|
88
|
-
if
|
|
89
|
-
|
|
90
|
+
if not self._name:
|
|
91
|
+
for key,value in vars(modules["__main__"]).items():
|
|
92
|
+
if value is self:
|
|
93
|
+
self._name=key
|
|
94
|
+
break
|
|
90
95
|
return self._not_delete
|
|
91
96
|
@property
|
|
92
97
|
def excluded(self):
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{memorymanagement-1.1.4 → memorymanagement-1.1.5}/memorymanagement.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|