I imaging you would need to force the Python garbage collector to free the memory. Unless there is a specific reason to free memory I would be inclined to just let the GC handle it.
https://docs.python.org/3/library/gc.html
see gc.collect
--
You received this message because you are subscribed to the Google Groups "Kivy users support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/97ebb191-9e12-49c9-b200-ea1121327077n%40googlegroups.com.
Taking a look at your code:
If these actions don’t help. I’d also suggest looking for a python memory profiling tool so you know what is driving the memory consumption.
There is also a kivy Cache manager that keeps image data around. You could also take a look there – but I would recommend starting by not creating new map objects every time you enter the screen.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/a6c5c4f7-3f17-4c67-be54-15d81a1ef8e4n%40googlegroups.com.