[Qt] DestroyGlobalCaret

Vincent Snijders vsnijders at quicknet.nl
Wed Jul 18 09:18:25 CEST 2007


Paul Ishenin schreef:
> Vincent Snijders wrote:
>> Hi,
>>
>> I looked at r11564.
>>
>> procedure DestroyGlobalCaret can be much simpler:
>>
>> FreeAndNil(GlobalCaret);
>>
>> I don't know if DestroyGlobalCaret is called from more than one place, but if it is 
>> used in only one place, I would remove the complete procedure.
> 
> yes, it is used in only one place. Free free to do anything you want 
> with it :)
> 
> And btw about later commit (by zeljan):
> 
> this condition is not needed:
> 
>   if GlobalCaret <> nil then
> 
> before GlobalCaret.Free sice Free already check object for nil before 
> call destructor.
>

This is exactly, what I was talking about. Did I use the wrong revision number?

Vincent



More information about the Qt mailing list