[Lazarus] Unicode branch

Michael Schnell mschnell at lumino.de
Mon Jul 1 11:11:22 CEST 2013


On 06/30/2013 08:14 PM, Florian Klämpfl wrote:
>
> It matters when people make assumptions when the a temp.

If an interface indeed is used as an "interface" externally of the 
program, Destroying it might result in a crash when the external program 
writes something back to the interface object (because it had been 
provided with a pointer so a field in same) later.

(I know of something similar when a friend of mine used a call to a 
(converted) c library to an external system. Here a var parameter was 
provided that (not "obviously") provided a pointer the the external 
system. The actual variable was just a local variable and thus on the 
stack. Now the external system stored the pointer and minutes after the 
call had been executed it decided to save some value at that location 
making the pascal application crash.)

Do you think something like that could happen with ref counted objects 
(that unlike interfaces can't be associated with external stuff) ?

-Michael





More information about the Lazarus mailing list