pp-macro.h: unsupported usage of appended list?

Milian Wolff mail at milianw.de
Tue Mar 8 10:08:02 UTC 2011


On 03/07/11 23:43, David Nolden wrote:
> You are misunderstanding this. Multiple dynamic containers are supported
> perfectly fine by appendedlists.h.

Ah yes, now I see it - must have been tired yesterday. Thanks for the 
heads up.

For the others: freeAppendedLists calls formalsFreeChain which calls 
formalsFree and definitionFreeChain and so forth.

> The warning simply means that there were a few dynamic instances of pp_macro
> alive when the helper container for dynamic lists of appendedlists.h was
> destroyed. This might either be a tiny static leak (the standard macros from
> setuphelper.cpp/h come into my mind), or a destruction order issue. Anyway
> the number 130 is not worrying at all. I primarily added this warning to
> prevent huge runtime memory leaks. You could for example simply turn it into
> kDebug if you dont want it to be a warning.

I'll dig into it again and see which macros these are and whether the 
warning can be fixed.

Thanks David

> Am 07.03.2011 23:11 schrieb "Milian Wolff"<mail at milianw.de>:
>
> Milian Wolff, 07.03.2011:
>
>> Hey all,
>>
>> I was finally fed up enough with this warning:
>>
>> pp_macro::definition There were ...
> btw: just adding definitionFreeChain(); to the pp-macro dtor triggers
>
> ASSERT:
> "temporaryHashpp_macrodefinition().getItem(definitionData).isEmpty()"
> in file /home/milian/projects/kde4/kdevelop/languages/cpp/parser/rpp/pp-
> macro.h, line 165
>
> probably because other functions from END_APPENDED_LISTS are not correct in
> pp-macro, e.g. copyListsFrom and similar...
>
> bye
>
> PS: can one use variadic macros somehow to add support for arbitrary number
> of
> containers in END_APPENDED_LISTS? I've not yet seen how, but considering
> what
> is possible (think Boost Preprocessor) I wouldn't suprised if someone gets
> that to work somehow...
>
>
>
>


-- 
Milian Wolff
http://milianw.de




More information about the KDevelop-devel mailing list