samedi 21 novembre 2015

python mediattor pattern memory leak?

i have few classes that communicate with each other over another class (something like Mediator pattern).

Every class prints message when created and when they are destoryed.

like on this picture

When i create Mediator object, Mediator holds references to all other objects, and all objects hold references to Mediator. Afrer that objects destructors are not called when program finishes. like on this picture

Why is that? Is this a memory leak?

Aucun commentaire:

Enregistrer un commentaire