Click here to Skip to main content
16,004,919 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Problem with CreateProcess()? Pin
Neville Franks25-Apr-02 11:47
Neville Franks25-Apr-02 11:47 
GeneralCObArray Problem Pin
Sameer Maggon23-Apr-02 23:56
Sameer Maggon23-Apr-02 23:56 
GeneralRe: CObArray Problem Pin
Tom Archer24-Apr-02 0:00
Tom Archer24-Apr-02 0:00 
GeneralRe: CObArray Problem Pin
Sameer Maggon24-Apr-02 1:16
Sameer Maggon24-Apr-02 1:16 
GeneralRe: CObArray Problem Pin
Chris Maunder24-Apr-02 1:19
cofounderChris Maunder24-Apr-02 1:19 
GeneralRe: CObArray Problem Pin
Sameer Maggon24-Apr-02 1:29
Sameer Maggon24-Apr-02 1:29 
GeneralRe: CObArray Problem Pin
Chris Maunder24-Apr-02 2:18
cofounderChris Maunder24-Apr-02 2:18 
GeneralRe: CObArray Problem Pin
Tom Archer24-Apr-02 1:25
Tom Archer24-Apr-02 1:25 
Sameer Maggon wrote:
now if i delete temp then it gets
removed from the array.. I don't want that..
so how do i remove the temp.. (coz would create memory leak)


1) Actually, I don't believe deleting an object removes its entry from the array. You'll need to do a RemoveAt for that to happen. Or a complete RemoveAll to dump all entries.

2) However, I don't follow your issue then. You're saying you have memory leaks because you're not freeing memory, but then say that you don't want to free memory Confused | :confused:

Simply put, you've allocated some objects in memory and placed pointers to these objects in an array (a CObArray). When you no longer need this array (such as when the containing object is being destroyed), you need to free the memory being pointed at by the array. To do that requires a simple for loop.




Cheers,
Tom Archer
Author, Inside C#

Please note that the opinions expressed in this correspondence do not necessarily reflect the views of the author.
Generalenable disabled dialog objects Pin
23-Apr-02 23:01
suss23-Apr-02 23:01 
GeneralRe: enable disabled dialog objects Pin
23-Apr-02 23:08
suss23-Apr-02 23:08 
QuestionHow to easy implement Regular Expression support? Pin
Alex Cramer23-Apr-02 23:00
Alex Cramer23-Apr-02 23:00 
AnswerRe: How to easy implement Regular Expression support? Pin
Joaquín M López Muñoz23-Apr-02 23:38
Joaquín M López Muñoz23-Apr-02 23:38 
GeneralRe: How to easy implement Regular Expression support? Pin
Alex Cramer23-Apr-02 23:43
Alex Cramer23-Apr-02 23:43 
GeneralRe: How to easy implement Regular Expression support? Pin
Joaquín M López Muñoz23-Apr-02 23:48
Joaquín M López Muñoz23-Apr-02 23:48 
GeneralThanks! Pin
Alex Cramer24-Apr-02 15:16
Alex Cramer24-Apr-02 15:16 
GeneralCtrl+O doesn't work... HELP! Pin
thundercatzlair23-Apr-02 22:52
thundercatzlair23-Apr-02 22:52 
GeneralFocus a Dialog Pin
Sameer Maggon23-Apr-02 22:26
Sameer Maggon23-Apr-02 22:26 
GeneralRe: Focus a Dialog Pin
Joaquín M López Muñoz23-Apr-02 23:03
Joaquín M López Muñoz23-Apr-02 23:03 
GeneralRe: Focus a Dialog Pin
Tom Archer24-Apr-02 0:14
Tom Archer24-Apr-02 0:14 
GeneralDynamically loading parts of an application's GUI Pin
23-Apr-02 22:21
suss23-Apr-02 22:21 
GeneralRe: Dynamically loading parts of an application's GUI Pin
Jon Hulatt23-Apr-02 23:48
Jon Hulatt23-Apr-02 23:48 
GeneralRe: Dynamically loading parts of an application's GUI Pin
23-Apr-02 23:55
suss23-Apr-02 23:55 
GeneralRe: Dynamically loading parts of an application's GUI Pin
Niklas L24-Apr-02 0:13
Niklas L24-Apr-02 0:13 
GeneralRe: Dynamically loading parts of an application's GUI Pin
24-Apr-02 14:56
suss24-Apr-02 14:56 
GeneralRe: Dynamically loading parts of an application's GUI Pin
Roger Allen24-Apr-02 0:15
Roger Allen24-Apr-02 0:15 

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.