[Qt] TQtCaret mem leak

Paul Ishenin ip at kmiac.ru
Wed Jul 18 03:06:12 CEST 2007


Vincent Snijders wrote:
> 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.

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.





More information about the Qt mailing list