我正在使用 wx.PasswordEntryDialog 从用户那里获取密码,但是每次创建 PasswordEntryDialog 时都会收到此错误:
swig/python detected a memory leak of type 'wxPasswordEntryDialog *', no destructor found.
这是导致它的地方之一:
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