Re: [fpc-pascal] SIGSEGV in SYSTEM_TOBJECT_$__CLEANUPINSTANCE when calling from C app

2010-12-14 Thread Sven Barth
Am 13.12.2010 22:43, schrieb Matthias Klumpp: On Mon, 13 Dec 2010 22:34:38 +0200, Juha Manninen juha.mannine...@gmail.com wrote: Matthias Klumpp kirjoitti maanantai 13 joulukuu 2010 18:50:46: if obj^ = nil then exit; FreeAndNil(obj^); Shouldn't it be: // if obj = nil then exit;-- not

[fpc-pascal] SIGSEGV in SYSTEM_TOBJECT_$__CLEANUPINSTANCE when calling from C app

2010-12-13 Thread Matthias Klumpp
Hi! I created a C application which calls methods from a library developed in Pascal. I can create objects by using void *test; test = br_object_new (); and access the object too, but when I try to free an object after it has been used, I get a segfault in SYSTEM_TOBJECT_$__CLEANUPINSTANCE. The

Re: [fpc-pascal] SIGSEGV in SYSTEM_TOBJECT_$__CLEANUPINSTANCE when calling from C app

2010-12-13 Thread Juha Manninen
Matthias Klumpp kirjoitti maanantai 13 joulukuu 2010 18:50:46: if obj^ = nil then exit; FreeAndNil(obj^); Shouldn't it be: // if obj = nil then exit; -- not really needed FreeAndNil(obj); Juha ___ fpc-pascal maillist -