I’m using a wx.PasswordEntryDialog to get a password from the user, but every time I create a PasswordEntryDialog I get this error:
swig/python detected a memory leak of type 'wxPasswordEntryDialog *', no destructor found.
Here is one of the places that causes it:
def getpass():
dialog = wx.PasswordEntryDialog(None, 'Enter your password')
if dialog.ShowModal() == wx.ID_OK:
value = dialog.GetValue()
else:
value = None
del dialog
return value
I found that you can get rid of the message by replacing the line
with
(I’m using wxWidgets/wxPython 2.9.3, if that’s relevant.)