[fpc-devel] About bug report 5098 (To Peter)

Jonas Maebe jonas.maebe at elis.ugent.be
Tue May 9 16:15:24 CEST 2006


On 9 mei 2006, at 16:03, Luiz Americo wrote:

> The bug 5098 was marked by Peter as not a bug because the file  
> handle would be opened inside a dll (another process), but the  
> examples where the bug is show does not uses another process or  
> dll. It simply implements a class in a separeted unit and then  
> create a instance of this class inside another unit. Also notice  
> that when using this class directly from a program it works fine.
>
> Shoud i re-open the bug?

No, your program is buggy. You have to declare TFileWriter.destroy as  
"override". It "works" in bugwritetotext because there you call  
destroy explicitly (instead of free). In bugwritetextshared you call  
free, and because destroy is not overridden, your destroy is never  
called.


Jonas



More information about the fpc-devel mailing list