[lazarus] Some patches against access violation errors
Vincent Snijders
vrs at dds.nl
Wed May 24 11:31:44 EDT 2000
From: Marc Weustink <weus at quicknet.nl>
> >Hi,
> >
> >I have been taking a look at the access violation errors when the program
> >terminates. I think they are caused by the fact the the global variable
> >Mouse is freeed twice, once in the Tapplication.terminate and once in the
> >finalization of the controls unit.
> >I suggest removing the ones in the finalization part.
>
> Ah, good point. I changed it and committed a fix, however I removed the
> Create and free from TApplication and kept the ones in Controls.pp.
> Mouse is part of the controls unit and not of the forms unit where
> Tapplication is defined. (To me it is a bit strange that an object in one
> unit is responsible for the creation/destruction of an object defined in
> another unit, what if you don't use forms ?)
You are right there. This is a design issue, but I could imagine that the
mouse object is not a global object, but a property of the application (or
screen) object.
>
> >Also I removed some {$ifdefs linux} from the gtkobject unit which only
> >seemed to be there because the win32-dll's didn't support them at the
time,
> >they do now. Pacthes are in the file patches.diff.txt.
>
> I didnt patch them since they depend on the patch for gtkfilesel.pp and
> gtksignal.pp. And I think these changes have to bew made by the FPC team.
I sent a message to Peter Vreman, asking him to apply these patches.
More information about the Lazarus
mailing list