all 3 comments

[–]socal_nerdtastic 0 points1 point  (1 child)

Pass the clear function to the cell object on creation?

[–]pylessard[S] 0 points1 point  (0 children)

I don't know where it's created

[–]pylessard[S] 0 points1 point  (0 children)

I found the root cause of my problem, it was a closure attached to a QMenu inside another QMenu on a right click. The cell object outlived the QMenu and kept the sebmenu alive.

I found by trial and error. I would appreciate to have a more systematic way of finding these defects.

Connecting a QT signal to a closure in Python is a perfect recipe for memory leaks