Re: Bug in MFC CList?
- From: David Wilkinson <no-reply@xxxxxxxxxxxx>
- Date: Mon, 23 Jul 2007 11:41:26 -0400
Dani wrote:
But can you tell me, if I'm allocating the way you are suggesting,
how much does it cost me "behind the scenes"?
I mean, in assembly code.
I normally use malloc()/free() or new/delete, knowing that it is the less expensive way. I do not like the managed code very much, because usually my applications are of the type which have to do a lot of work in the shortest time....
Dani:
As Doug suggests, you need not use new[] at all. Do like this:
CList<int> listNotBuggy[5];
char charNotBuggy[20];
It is never necessary to use new[] for local variables if you have fixed sizes. If you need run-time sizes, you should use std::vector.
--
David Wilkinson
Visual C++ MVP
.
- References:
- Re: Bug in MFC CList?
- From: Doug Harrison [MVP]
- Re: Bug in MFC CList?
- Prev by Date: Re: Drawing Layers
- Next by Date: Re: austoscroll with images in the view
- Previous by thread: Re: Bug in MFC CList?
- Next by thread: Re: Bug in MFC CList?
- Index(es):
Relevant Pages
|