I use this way to remove an emelment from a dict:
d["ele"] = data
...
d["ele"] = None
I think by this I can remove the reference on the original element so that the removed data can be freed, no memory leak.
Is it the right way to do this?
You remove an element from a dictionary using
del: