Click here to Skip to main content
15,907,328 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Valid e-mail address Pin
Ravi Bhavnani11-Apr-02 12:27
professionalRavi Bhavnani11-Apr-02 12:27 
GeneralRe: Valid e-mail address Pin
Christian Graus11-Apr-02 12:40
protectorChristian Graus11-Apr-02 12:40 
GeneralRe: Valid e-mail address Pin
Ravi Bhavnani11-Apr-02 12:44
professionalRavi Bhavnani11-Apr-02 12:44 
GeneralRe: Valid e-mail address Pin
Jon Hulatt11-Apr-02 23:26
Jon Hulatt11-Apr-02 23:26 
GeneralCaveat! Pin
Ravi Bhavnani11-Apr-02 12:30
professionalRavi Bhavnani11-Apr-02 12:30 
GeneralRe: Caveat! Pin
Alexandru Savescu11-Apr-02 12:45
Alexandru Savescu11-Apr-02 12:45 
GeneralErasing elements in a stl container of pointers Pin
Alexandru Savescu11-Apr-02 11:46
Alexandru Savescu11-Apr-02 11:46 
GeneralRe: Erasing elements in a stl container of pointers Pin
Christian Graus11-Apr-02 12:12
protectorChristian Graus11-Apr-02 12:12 
Because it is a vector, calling erase is very expensive. If you're going to do this to a number of elements, use remove to partition them first, and if you do it a lot, consider std::list, or if you need faster lookup than std::list provides, try set.

If you have a container of pointers, then you need to delete the iterators contents first, otherwise the pointer will be deleted and not it's contents. If you have a container of objects, then the destructor is called, but calling a pointers destructor is not the same as calling the destructor of the object being pointed to. If it was, memory leaks would not be possible.


Christian

The tragedy of cyberspace - that so much can travel so far, and yet mean so little.

"I'm somewhat suspicious of STL though. My (test,experimental) program worked first time. Whats that all about??!?!
- Jon Hulatt, 22/3/2002
GeneralRe: Erasing elements in a stl container of pointers Pin
Alexandru Savescu11-Apr-02 12:23
Alexandru Savescu11-Apr-02 12:23 
GeneralRe: Erasing elements in a stl container of pointers Pin
Christian Graus11-Apr-02 12:31
protectorChristian Graus11-Apr-02 12:31 
GeneralModeless dialog minimising Pin
Derek Lakin11-Apr-02 10:52
Derek Lakin11-Apr-02 10:52 
GeneralRe: Modeless dialog minimising Pin
Shog911-Apr-02 16:25
sitebuilderShog911-Apr-02 16:25 
GeneralRe: Modeless dialog minimising Pin
Derek Lakin11-Apr-02 19:50
Derek Lakin11-Apr-02 19:50 
GeneralReading the registry on another machine. Pin
11-Apr-02 10:02
suss11-Apr-02 10:02 
GeneralRe: Reading the registry on another machine. Pin
Len Holgate11-Apr-02 11:05
Len Holgate11-Apr-02 11:05 
GeneralCalling a C++ dll from VB (STRING PROBLEMS) Pin
mantrashrim11-Apr-02 9:44
mantrashrim11-Apr-02 9:44 
GeneralRe: Calling a C++ dll from VB (STRING PROBLEMS) Pin
Philip Patrick11-Apr-02 10:24
professionalPhilip Patrick11-Apr-02 10:24 
QuestionClear Checkbox?? Pin
Aoife11-Apr-02 9:05
Aoife11-Apr-02 9:05 
AnswerRe: Clear Checkbox?? Pin
Ravi Bhavnani11-Apr-02 9:11
professionalRavi Bhavnani11-Apr-02 9:11 
GeneralRe: Clear Checkbox?? Pin
James R. Twine12-Apr-02 9:57
James R. Twine12-Apr-02 9:57 
GeneralJames is right Pin
Ravi Bhavnani12-Apr-02 10:00
professionalRavi Bhavnani12-Apr-02 10:00 
GeneralMacros and Addins in VC7 Pin
Jim A. Johnson11-Apr-02 8:38
Jim A. Johnson11-Apr-02 8:38 
QuestionAny Class for a JTAG interface? Pin
jooan11-Apr-02 8:01
jooan11-Apr-02 8:01 
AnswerRe: Any Class for a JTAG interface? Pin
Mike Nordell11-Apr-02 8:52
Mike Nordell11-Apr-02 8:52 
GeneralRe: Any Class for a JTAG interface? Pin
Ravi Bhavnani11-Apr-02 9:16
professionalRavi Bhavnani11-Apr-02 9:16 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.