Click here to Skip to main content
15,898,036 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
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 
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 
Hi to all,

Thanks for your suggestions.

In every class I was using Add___() function to add object of other class.
I was reading a 35 MB xml & using that I was calling Add___() every time a found an object of class A, B, C, D, .. & I was getting problem at DelAll macro (it was taking more time to execute that might be due to lot of data).

Now I have replaced the Add___() function call, by it’s function body. Now it is taking normal time to execute DelAll macro

<br />
class A<br />
{<br />
	void Add_B(const B* newBs, int newBsCount)<br />
	{<br />
		if( newBsCount <= 0 )<br />
			return;<br />
<br />
		B* temp_Bs = NULL;<br />
<br />
		if( 0 < AllBsCount )<br />
			temp_Bs = new B[AllBsCount ];<br />
<br />
		int i<br />
		for( i= 0 ; i < AllBsCount; i++ )<br />
			temp_ Bs [i] = AllDays[i];<br />
<br />
		DelAll(AllBs, AllBsCount)   //problem macro<br />
<br />
		AllBs = new B[AllBsCount + newBsCount];<br />
		for( i = 0 ; i < AllBsCount; i++ )<br />
			AllBs [i] = temp_Days[i];<br />
		for( i = 0 ; i < newBsCount; i++ )<br />
			AllBs [AllBsCount +i] = newBs [i]; <br />
<br />
		DelAll(temp_ Bs, AllBsCount);<br />
<br />
		AllBsCount += newBsCount;<br />
	}<br />
}<br />


Thanks & Best Regards,
Aniket A. Salunkhe
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 
GeneralRe: Size of memory pointed to by void * pointer. Pin
VC++Maniac12-Dec-08 1:38
VC++Maniac12-Dec-08 1:38 
GeneralRe: Size of memory pointed to by void * pointer. Pin
Jijo.Raj12-Dec-08 2:08
Jijo.Raj12-Dec-08 2:08 

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.