[Python-Dev] tp_dealloc

Amaury Forgeot d'Arc amauryfa at gmail.com
Tue Jun 1 18:56:39 CEST 2010


2010年6月1日 <smarv at gmx.net>:
>> Without further information, I cannot consider this as a problem in
>> Python.
>> I know other extension modules that manage memory in their own way, and
>> work.
>> It's more probably an issue in the code of your type.
>>>> --
>> Amaury Forgeot d'Arc
>> Ok, thank you, but I'm still hoping, someone could test this.
> I'm very sure, my app is not the cause;
> only the python31.dll (py_finalize) is accessing the freed memory.
> Inside py_finalize there is really no call to my hosting app (or reverse),
> I even tested this in my debugger.

To be clear:
- you did not provide anything for us to test.
- the fact that the crash is inside python31.dll does not indicates a
bug in python.
Consider this (bogus) code:
 FILE *fp = fopen("c:/temp/t", "w");
 free(fp);
This will lead to a crash at program exit (when fcloseall() is called
by the system)
but the issue is really in the code - it should not free(fp).
Without knowing what your code really do, we won't be able to help.
-- 
Amaury Forgeot d'Arc


More information about the Python-Dev mailing list

AltStyle によって変換されたページ (->オリジナル) /