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 ?
Mailing lists / qt / 2007-07
TQtCaret mem leak
5 messages · 3 people · –
- UUnknown author 2
- VVincent Snijders 2
- PPaul Ishenin 1
Reply by email Subscribe to this list Your subscription
Read-only archive. Use j and k to move between messages.
Show quoted text 7 lines
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.
Who creates the GlobalCaret?
Vincent
Quoting Vincent Snijders :
Show quoted text 12 lines
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.
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.
Show quoted text 11 lines
Quoting Vincent Snijders :
> 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.
Show quoted text 5 lines
>
> 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
Vincent Snijders wrote 14 lines
schreef:
> Quoting Vincent Snijders :
>
>> 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.
More usual way (used in other widgetsets) is to use TQtWidgetset.Destroy, so I've done it that way.
It will be more comfortable for other devels if things are done in one way in most widgetsets.
Best regards,
Paul Ishenin.
