CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2009
    Posts
    399

    CStringList on heap

    If I have a class member as CStringList with a lot of elements, is worth it to create it on heap (with new), or is enough to create it on stack ?

  2. #2
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,398

    Re: CStringList on heap

    Create it "on stack" is OK. All its elements will be created in the heap just "by design".
    Victor Nijegorodov

  3. #3
    Join Date
    Jan 2009
    Posts
    399

    Re: CStringList on heap

    Ok, thank you. The same is the case with CArray / CMap ?

  4. #4
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,398

    Re: CStringList on heap

    yep.
    Victor Nijegorodov

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured