Menu

#2 Some more leaks...

open
None
7
2004-09-28
2004-09-20
No

hi,
i mentioned some more memleaks (v1.4.1b):

1.) win_tss & get_tss()
at tss = new win_tss;

2.) void dispatcher::add_signals( const signals_vector&
signals)
at m_signals_stack.push(signals);

3.) and some more, but when I try to get 'em Vc++ 2003
kicks me out...it hangs, ergh!

you can see the leaks by calling

int temp = _CrtSetDbgFlag(_CRTDBG_REPORT_FLAG);
temp |= _CRTDBG_LEAK_CHECK_DF;
_CrtSetDbgFlag(temp);

in WinMain. with _CrtSetBreakAlloc(allocNum); you can
set a breakpoint at allocation number allocNum to trace
back to the memory allocation

(I'm sure you have already known this ;-) )

Discussion

  • Steven Weiss

    Steven Weiss - 2004-09-21

    Logged In: YES
    user_id=1124235

    some more:

    1.)
    base * clone() const
    { return new func_exec<func,base>(*this); }

    2.)
    func_wrapper2(raw_func f)
    : m_f(new detail::func_exec<raw_func,func_keeper>(f))
    {}

    I think this is a major problem because I have so much leaks...
    and my app is very small at the moment! i gave it a priority of
    7

     
  • Steven Weiss

    Steven Weiss - 2004-09-21
    • priority: 5 --> 7
     
  • John Torjo

    John Torjo - 2004-09-28

    Logged In: YES
    user_id=1031729

    Thanks for letting me know. I will take a look at this ASAP.

    Best,
    John

     
  • John Torjo

    John Torjo - 2004-09-28
    • assigned_to: nobody --> jtorjo
     
  • John Torjo

    John Torjo - 2004-09-28

    Logged In: YES
    user_id=1031729

    Yes, you're right.
    I've fixed them and they'll be available on the v1.5 release.
    I'll also look for other leaks - if any.

    Best,
    John

     
  • Tobias Güntner

    Tobias Güntner - 2004-11-06

    Logged In: YES
    user_id=821057

    One more leak:

    create_info & menu( int menu_id) {
    m_id_or_menu = ::LoadMenu( m_instance,
    MAKEINTRESOURCE(menu_id) );
    return *this;
    }

    This handle gets lost if someone calls menu() twice or
    creates a dialog (which does not use this menu as far as I
    can tell).

     
  • John Torjo

    John Torjo - 2004-11-13

    Logged In: YES
    user_id=1031729

    [Answering to fatbull]

    Thanks for pointing it out. However, I assume it's a
    programmatic error to call menu() twice, or call menu() and
    id(). That said, I should document this somewhere ;)

    Best,
    John

     

Log in to post a comment.