Skip to content

Minor fixes for a memory debugging tool#3158

Merged
j9ac9k merged 1 commit intopyqtgraph:masterfrom
campagnola:fix-memory-profiler
Oct 13, 2024
Merged

Minor fixes for a memory debugging tool#3158
j9ac9k merged 1 commit intopyqtgraph:masterfrom
campagnola:fix-memory-profiler

Conversation

@campagnola
Copy link
Copy Markdown
Member

.. that probably doesn't belong in this library, but it's super handy when you need it (which is almost always in projects that use pyqtgraph)

for key in (id(olist), id(gcl), id(sys._getframe())):
try:
del olist[key]
except KeyError:

Check notice

Code scanning / CodeQL

Empty except

'except' clause does nothing but pass and there is no explanatory comment.
del objs[id(frame.f_code)]
try:
del objs[id(frame)] ## ignore the current frame
except KeyError:

Check notice

Code scanning / CodeQL

Empty except

'except' clause does nothing but pass and there is no explanatory comment.
pass
try:
del objs[id(frame.f_code)]
except KeyError:

Check notice

Code scanning / CodeQL

Empty except

'except' clause does nothing but pass and there is no explanatory comment.
@j9ac9k
Copy link
Copy Markdown
Member

j9ac9k commented Oct 13, 2024

you're right, it shouldn't be in this library :P but as it already is, fixes definitely appreciated!

@j9ac9k j9ac9k merged commit cc7c7f5 into pyqtgraph:master Oct 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants