On 14 Feb 2014, at 20:06, Fred van Stappen wrote:

> Hello.
> 
> It seams to me that i monopolize the forum here.
> Please advice if it borrow you, i will stop directly... ;-)
> 
> I still fight with cmem and trust me, it is a hard battle.

What I have been wondering for some time now (perhaps you wrote it in a mail 
and I missed it): do you use the same memory manager in the library and in your 
test program?

Also, beware when returning pointers. Consider this snippet:

Procedure ReturnTheAnwer: PInteger;
Var     a: Integer;
Begin
        a:= 42;
        Result:= @a;
End;

One might think at first glance that `ReturnTheAnswer^` is 42, but this is 
incorrect in some cases. The example here might be extremely over-simplified, 
but replace `a: Integer` with `mystring: String` and we're roughly at your 
example.

--
Ewald

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

Reply via email to