Click here to Skip to main content
15,908,173 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: how to fetch email from aol or hotmail? Pin
bryce27-Feb-03 18:55
bryce27-Feb-03 18:55 
GeneralRe: how to fetch email from aol or hotmail? Pin
coolvcguy27-Feb-03 19:18
coolvcguy27-Feb-03 19:18 
GeneralAssociating a value with Tree Node Pin
Ph@ntom26-Feb-03 22:26
Ph@ntom26-Feb-03 22:26 
GeneralRe: Associating a value with Tree Node Pin
567890123427-Feb-03 1:47
567890123427-Feb-03 1:47 
GeneralIntercepting WM_QUERYENDSESSION Pin
Master Vip26-Feb-03 21:46
Master Vip26-Feb-03 21:46 
GeneralRe: Intercepting WM_QUERYENDSESSION Pin
Hans Ruck26-Feb-03 21:55
Hans Ruck26-Feb-03 21:55 
GeneralWindows skins Pin
Anonymous26-Feb-03 21:45
Anonymous26-Feb-03 21:45 
Questiondelete Operator? Pin
anju26-Feb-03 21:15
anju26-Feb-03 21:15 
Hi,all

In my application I am using the Class objects ass follows

//In MainOne.h
Class CMainOne
{

public:
class CSomeA
{
public:
int nXA;
int nYA;
};

class CSomeC
{
public:
int nXC;
int nYC;
SomeA *objSomeA;
};

SomeC * objSomeC;

};//Class CMainOne

//In MainOne.cpp

CMainOne::MyFunction
{
objSomeC=new CSomec[10];

for(int nIndex=0;nIdex<10;nIndex++)
{
objSomeC[nIndex].objSomeA=new CSomeA[10];
}

}


can any one help me how can I delete these created objects with new operator by using delete operator.

Note:I tried like this
delete [] objSomec->objSomeA
(which was "objSomeC[nIndex].objSomeA=new CSomeA[10];"

delete [] objSomeC
(which was objSomeC=new CSomec[10];)
still i am getting memory leak;
please help me
regradsRose | [Rose]
anju
AnswerRe: delete Operator? Pin
Hans Ruck26-Feb-03 21:36
Hans Ruck26-Feb-03 21:36 
GeneralRe: Thanks.. Pin
anju27-Feb-03 0:13
anju27-Feb-03 0:13 
AnswerRe: delete Operator? Pin
Johnny ²26-Feb-03 21:36
Johnny ²26-Feb-03 21:36 
GeneralDisable the Default Pop-up Menu for CHtmlView Pin
lukmyt26-Feb-03 19:39
lukmyt26-Feb-03 19:39 
GeneralRe: Disable the Default Pop-up Menu for CHtmlView Pin
HENDRIK R26-Feb-03 22:00
HENDRIK R26-Feb-03 22:00 
GeneralAbout #pragma Pin
IMiracle26-Feb-03 18:54
IMiracle26-Feb-03 18:54 
GeneralRe: About #pragma Pin
berndg26-Feb-03 20:57
berndg26-Feb-03 20:57 
GeneralDialog Image Control Pin
lead2gold26-Feb-03 16:49
lead2gold26-Feb-03 16:49 
GeneralRe: Dialog Image Control Pin
Chris Richardson26-Feb-03 17:19
Chris Richardson26-Feb-03 17:19 
GeneralRe: Dialog Image Control Pin
lead2gold27-Feb-03 16:48
lead2gold27-Feb-03 16:48 
GeneralRe: Dialog Image Control Pin
Chris Richardson27-Feb-03 17:02
Chris Richardson27-Feb-03 17:02 
GeneralRe: Dialog Image Control Pin
ashxly26-Feb-03 18:17
ashxly26-Feb-03 18:17 
GeneralRe: Dialog Image Control Pin
Chris Richardson27-Feb-03 17:02
Chris Richardson27-Feb-03 17:02 
GeneralExit codes... Pin
el davo26-Feb-03 16:49
el davo26-Feb-03 16:49 
GeneralRe: Exit codes... Pin
-Dy27-Feb-03 4:02
-Dy27-Feb-03 4:02 
GeneralRe: Exit codes... Pin
el davo27-Feb-03 13:09
el davo27-Feb-03 13:09 
GeneralRe: Exit codes... Pin
-Dy27-Feb-03 22:41
-Dy27-Feb-03 22:41 

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.