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 code to free an object looks like to following:
procedure br_object_free(obj: PObject);cdecl;
begin
 if obj^ = nil then exit;
 FreeAndNil(obj^);
end;
I can access all properties of obj^, as well as calling methods. I only
cannot free the object.
Does someone have an idea why the application behaves like this? I use FPC
2.4.0.
Kind regards
  Matthias Klumpp


_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to