|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
wxProcess looks like memory leak
code like this:
class ProcessScan(wx.Process): def __init__(self, parent): wx.Processinit__(self, parent) def Terminate(self, pid, status): thread.processScan.Detach() thread.processScan.C() thread.processScan = None thread.processScan = ProcessScan(self) thread.processScan.Redirect() cwd = os.getcwd() path = self.config_scan.path os.chdir(path[0:path.rfind('\\')+1]) wx.Execute(self.edit_file_scan.GetValue(), wx.EXEC_ASYNC, thread.processScan) os.chdir(cwd) class read_thread(threading.Thread): def run(self): while bThread: if self.processScan is not None: stream = () if stream is not None and stream.CanRead(): print stream.read(), del stream time.sleep(0.01) When I start the read_thread, the memory used by this program incresed by 4K/3s, even if stream.CanRead() returns False. Where is the memory leak? Thank you |
![]() |
| Viewing: Web Development Archives > Mailing Lists > Python > wxProcess looks like memory leak |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|