Edit: I have added an addendum to the question here that should reduce the scope of the question. Apologies to all that I have annoyed and wasted time by perhaps posting the question to soon, it wasn't my intention, and I have learned how better to do it next time.
I have a question that I'd like to ask, but I'm afraid that it may be closed as too broad. I'm wondering whether someone can check it through first and offer suggestions. Here it is:
Is it possible for a Python function to still use memory after being called?
If I run a function in Python 3 (
func()
) is there anything that could be insidefunc()
that would cause it to increase its memory usage?For instance, will running
def func(): # Anything and everything in here while True: func()
ever cause the program run out of memory, no matter what is in
func()
?If the program is continually using memory, what are some possible things that could be going on in
func()
to cause it to continue using memory after it has been called?
func()
" that's the trick. You could conceivably get 10,000 answers, all equally correct.func.__dict__
and append an item to it insidefunc
.func
then infinitely increases in size