I'm experimenting with embedding python into an MFC prgram running under
Windows NT.
I managed to build a debug version of the python dll ok, but when I tried
running a simple script the MFC debugger complained of memory leaks.
Removing statements showed that the following leaked
void Button1_press() {
Py_Initialize();
}
Looking through the source I came to the conclusion that perhaps I should
be doing the following:
void Button1_press() {
Py_Initialize();
Py_Finalize();
}
but this still leaked.
Further investigation revealed that at least one of the items which was
leaking was some form of string object which was initialised whilst the
python string module was loaded.
Can anyone cast any further light on this?
Thanks,
Chris Williamson.
Windows NT.
I managed to build a debug version of the python dll ok, but when I tried
running a simple script the MFC debugger complained of memory leaks.
Removing statements showed that the following leaked
void Button1_press() {
Py_Initialize();
}
Looking through the source I came to the conclusion that perhaps I should
be doing the following:
void Button1_press() {
Py_Initialize();
Py_Finalize();
}
but this still leaked.
Further investigation revealed that at least one of the items which was
leaking was some form of string object which was initialised whilst the
python string module was loaded.
Can anyone cast any further light on this?
Thanks,
Chris Williamson.