In the given program, after creating 10000 instance, free memory will be less than the previous free memory. But after gc() call, you will get more free memory.
Output