# hello world script causes memory leak

My script generates about 400 objects. If I run the same script twice, I notice the object count remains the same, but the memory allocated does increase substantially.

I thought it was my code (and it may still be), but can someone explain why the following piece of code causes a small (but noticeable) memory leak?

This is after I hold both Alt+P (which runs the script) and I keep my eye on |Mem:11.12M| on top of the blender UI. It increases by .01M every ~5 seconds.

if __name__ == "__main__":
print('hello')


• @user1798810 running the RunScript operator adds this action into the undo list, so everything the script does can be undone. You can check the Undo list by pressing Ctrl-Alt-Z inside 3d view window. It is possible your full script experiences memory leaks, but I don't see this with print("Hello") – Jaroslav Jerryno Novotny Jul 20 '17 at 0:20