Archived

This topic is now archived and is closed to further replies.

Deleting a dynamic array of std::lists

This topic is 5150 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi guys, Small problem, this may be a stupid question - rough hangover , if I create a dynamic array where each element is a std::list as such: std::list *pFreeList = new std::list[10]; How do I delete each std::list element of the array? Thanks Kyle

Share this post


Link to post
Share on other sites
D''oh..! Thought it was something std::list specific that wouldn''t allow delete[] to work, turns out it was a typo..! Took long enough to spot :/

Thanks guys
Kyle

Share this post


Link to post
Share on other sites