[fpc-devel] Dynamic Arrays as Static class variables

Johann Glaser Johann.Glaser at gmx.at
Mon Oct 4 23:36:22 CEST 2010


Hi!

It seems there is a problem with dynamic arrays which are defined as
static variables in classes.

Type
  TTest = class
    FDynArr : Array of Integer; static;
  End;

When the class is Destroy()ed, the call to CleanupInstance, which calls
fpc_finalize, does a fpc_dynarray_decr_ref which generates a SEGV. Did
anybody else experience this problem (using FPC2.4.0-2 on a AMD64
machine). If not, I'll put a test case together.

Bye
  Hansi





More information about the fpc-devel mailing list