[Qt] TQtCaret mem leak
Vincent Snijders
vsnijders at quicknet.nl
Tue Jul 17 22:06:59 CEST 2007
zeljko at holobit.net schreef:
> Quoting Vincent Snijders <vsnijders at quicknet.nl>:
>
>> zeljko at holobit.net schreef:
>>> Seem that nobody is freeing GlobalCaret variable from QtCaret unit, so
>>> it produces mem leak.
>>> So , should we create it with Application parameter as Owner instead
>>> of nil, or call some destroy on app termination ?
>>> I've just setted up Application as Owner, leak is gone ....
>>> any ?
>>>
>> My first idea is in TQTWidgetSet.Destroy or TQTWidgetSet.AppTerminate.
Or let the WidgetSet be the owner, instead of the application.
>>
>> Who creates the GlobalCaret?
>
> winapi eg. ShowCaret(). It's created only once during application
> lifetime (if any control asks about caret), and it's never deleted.
Vincent
More information about the Qt
mailing list