in reply to Memory and garbage collection
If I reach the end of my program, and it terminates as it should - is the memory with the circular references freed anyway? If it is, does it mean that technically, there can be no such thing as a memory leak in perl as long as the program isn't interrupted?If by "interrupted" you mean killed (e.g. by ctrl-c), it makes no difference. Memory allocated by the process is returned to the system when the process terminates, regardless of how it terminates. Memory leaks are only happening during the run of a program, usually they're encountered with long-running programs like daemons.
|
|---|