Click here to Skip to main content
15,897,187 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Converting PCM to GSM06.10 with ACM Pin
Mark Salsbery12-Dec-08 7:40
Mark Salsbery12-Dec-08 7:40 
GeneralRe: Converting PCM to GSM06.10 with ACM Pin
Mark Salsbery12-Dec-08 7:42
Mark Salsbery12-Dec-08 7:42 
GeneralRe: Converting PCM to GSM06.10 with ACM Pin
Eytukan12-Dec-08 7:51
Eytukan12-Dec-08 7:51 
GeneralRe: Converting PCM to GSM06.10 with ACM Pin
Mark Salsbery12-Dec-08 7:58
Mark Salsbery12-Dec-08 7:58 
GeneralRe: Converting PCM to GSM06.10 with ACM Pin
Eytukan12-Dec-08 8:10
Eytukan12-Dec-08 8:10 
QuestionUDP server with multiclients Pin
sunny_vc12-Dec-08 2:20
sunny_vc12-Dec-08 2:20 
AnswerRe: UDP server with multiclients Pin
Eytukan12-Dec-08 7:35
Eytukan12-Dec-08 7:35 
Questiondeleting array of objects of a class Pin
Andy Rama12-Dec-08 1:35
Andy Rama12-Dec-08 1:35 
Hi to all,

I am have written some classes in C++ as follows,

Class A
{
int b1Len; //count of B type objects in b1Collection
B *b1Collection; //stores collection of object of type B

int b2Len; //count of B type objects in b2Collection
B *b2Collection; //stores collection of object of type B
};
Class B
{
int cLen; //count of C type objects in cCollection //cLen is atleast 30
C *cCollection; //stores collection of object of type C
};
Class C
{
int d1Len; //count of D type objects in d1Collection //d1Len is atleast 140
D *d1Collection; //stores collection of object of type D

int d2Len; //count of D type objects in d2Collection
D *d2Collection; //stores collection of object of type D

int e1Len; //count of E type objects in e1Collection
E *e1Collection; //stores collection of object of type E

int e2Len; //count of E type objects in e2Collection
E *e2Collection; //stores collection of object of type E

};
Class D
{
int fLen; //count of F type objects in fCollection //fLen is atleast 2
F *fCollection; //stores collection of object of type F
};
Class F
{
int len; //count of characters in str //len is atleast 200
char *str; //stores multiple characters
};


int aLen; //count of A type objects in aCollection
A *aCollection; //stores collection of object of type A

DelAll(aCollection, aLen); //aLen is atleast 30

//it's a macro to delete array of objects of any type
#define DelAll(obj, no) if( obj != NULL ) { if( 0 < no ) { delete[] obj; obj = NULL; } }
I am using this macro in destructor of all class (above) to delete array of objects.

My problem is, it's takes atleast 0.86 secs

Is there anything wrong I am doing?

I am using VC++ 2008 as IDE.

Thanks & Regards,
Aniket A. Salunkhe
AnswerRe: deleting array of objects of a class Pin
Sarath C12-Dec-08 2:41
Sarath C12-Dec-08 2:41 
AnswerRe: deleting array of objects of a class Pin
Andy Rama17-Dec-08 21:30
Andy Rama17-Dec-08 21:30 
QuestionRe: deleting array of objects of a class Pin
Maximilien12-Dec-08 3:08
Maximilien12-Dec-08 3:08 
AnswerRe: deleting array of objects of a class Pin
Alan Balkany12-Dec-08 4:00
Alan Balkany12-Dec-08 4:00 
GeneralRe: deleting array of objects of a class Pin
Maximilien12-Dec-08 4:44
Maximilien12-Dec-08 4:44 
GeneralRe: deleting array of objects of a class Pin
Alan Balkany12-Dec-08 7:36
Alan Balkany12-Dec-08 7:36 
AnswerRe: deleting array of objects of a class Pin
Eytukan12-Dec-08 7:19
Eytukan12-Dec-08 7:19 
Questionusing SAFEARRAY Pin
KASR112-Dec-08 1:29
KASR112-Dec-08 1:29 
AnswerRe: using SAFEARRAY Pin
Jijo.Raj12-Dec-08 1:44
Jijo.Raj12-Dec-08 1:44 
QuestionRe: using SAFEARRAY Pin
David Crow12-Dec-08 3:16
David Crow12-Dec-08 3:16 
AnswerRe: using SAFEARRAY Pin
KASR112-Dec-08 3:17
KASR112-Dec-08 3:17 
QuestionRe: using SAFEARRAY Pin
David Crow12-Dec-08 3:19
David Crow12-Dec-08 3:19 
AnswerRe: using SAFEARRAY Pin
KASR112-Dec-08 3:23
KASR112-Dec-08 3:23 
AnswerRe: using SAFEARRAY Pin
KASR112-Dec-08 3:24
KASR112-Dec-08 3:24 
QuestionSize of memory pointed to by void * pointer. Pin
VC++Maniac12-Dec-08 1:00
VC++Maniac12-Dec-08 1:00 
AnswerRe: Size of memory pointed to by void * pointer. Pin
Naveen12-Dec-08 1:16
Naveen12-Dec-08 1:16 
AnswerRe: Size of memory pointed to by void * pointer. Pin
Jijo.Raj12-Dec-08 1:18
Jijo.Raj12-Dec-08 1:18 

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.