Why does exponentiation result in a memory leak?

asked 1 year ago

millermj gravatar image

The code

for i in range(17000000):
   10^(1/4)
input("Press enter to finish")

results in a 1GB memory leak. Why? In particular, why doesn't garbage collection deal with this?

Preview: (hide)

Comments

What about also indenting input ?!

dan_fulea gravatar imagedan_fulea ( 1 year ago )

I do not see any memory leak in Sage 10.3 under Linux. Memory consumption remains constant while the for loop is running.

Max Alekseyev gravatar imageMax Alekseyev ( 1 year ago )