Click here to Skip to main content
15,888,454 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: abstract class problem Pin
followait7-Nov-05 19:19
followait7-Nov-05 19:19 
QuestionProblem building projects from command line Pin
Henrik Pettersson7-Nov-05 5:18
Henrik Pettersson7-Nov-05 5:18 
Questionload data from excel Pin
hoanhdung7-Nov-05 3:46
hoanhdung7-Nov-05 3:46 
AnswerRe: load data from excel Pin
Cedric Moonen7-Nov-05 3:58
Cedric Moonen7-Nov-05 3:58 
AnswerRe: load data from excel Pin
David Crow7-Nov-05 5:22
David Crow7-Nov-05 5:22 
AnswerRe: load data from excel Pin
S Douglas7-Nov-05 20:25
professionalS Douglas7-Nov-05 20:25 
Questionhooking to a COM port opened by another application Pin
pankajdaga7-Nov-05 3:16
pankajdaga7-Nov-05 3:16 
Questionneed help on memory leak Pin
houari_id7-Nov-05 2:06
houari_id7-Nov-05 2:06 
Dear All...

I have problems in avoiding memory leak. I've browsed through the message board regarding memory leak, but still can not find solution.
I have this function:
void CPA003Dlg::doMultiplyT(double **A, int M)<br />
{<br />
	double temp_Sum = 0;<br />
	double **B;<br />
	B = new double *[M];<br />
	for (int x=0;x<M;x++) B[x] = new double [2];<br />
	for (x=0;x<M;x++) {<br />
		B[x][0] = A[0][M];<br />
		B[x][1] = A[1][M];<br />
	}<br />
<br />
	for (x=0; x<2; x++) {<br />
		for (int y=0; y<2; y++) {<br />
			for (int z=0; z<M; z++) {<br />
				temp_Sum += (A[x][z]*B[z][y]);<br />
			}<br />
			P[x][y] = temp_Sum;<br />
			temp_Sum = 0;<br />
		}<br />
	}<br />
<br />
	delete []B;<br />
	B = NULL;<br />
<br />
}


what should I do?

thanks...
AnswerRe: need help on memory leak Pin
toxcct7-Nov-05 2:50
toxcct7-Nov-05 2:50 
GeneralRe: need help on memory leak Pin
Cedric Moonen7-Nov-05 2:52
Cedric Moonen7-Nov-05 2:52 
GeneralRe: need help on memory leak Pin
toxcct7-Nov-05 2:56
toxcct7-Nov-05 2:56 
GeneralRe: need help on memory leak Pin
houari_id7-Nov-05 13:05
houari_id7-Nov-05 13:05 
AnswerRe: need help on memory leak Pin
David Crow7-Nov-05 2:55
David Crow7-Nov-05 2:55 
GeneralRe: need help on memory leak Pin
houari_id7-Nov-05 13:10
houari_id7-Nov-05 13:10 
Questionhow can i connect MsAccess Pin
sheerprogrammer6-Nov-05 21:23
sheerprogrammer6-Nov-05 21:23 
AnswerRe: how can i connect MsAccess Pin
Barm7-Nov-05 16:57
Barm7-Nov-05 16:57 
QuestionUrgent help my entire ERP project's class view is missing Resourse view stopped working Pin
shivditya6-Nov-05 20:39
shivditya6-Nov-05 20:39 
AnswerRe: Urgent help my entire ERP project's class view is missing Resourse view stopped working Pin
vikas amin6-Nov-05 21:34
vikas amin6-Nov-05 21:34 
GeneralRe: Urgent help my entire ERP project's class view is missing Resourse view stopped working Pin
shivditya6-Nov-05 21:56
shivditya6-Nov-05 21:56 
Questionhow to draw a pie chart and graph in vc++ Pin
sachin_coer6-Nov-05 20:33
sachin_coer6-Nov-05 20:33 
AnswerRe: how to draw a pie chart and graph in vc++ Pin
ddmcr6-Nov-05 21:06
ddmcr6-Nov-05 21:06 
GeneralRe: how to draw a pie chart and graph in vc++ Pin
ThatsAlok6-Nov-05 21:22
ThatsAlok6-Nov-05 21:22 
GeneralRe: how to draw a pie chart and graph in vc++ Pin
ddmcr6-Nov-05 22:15
ddmcr6-Nov-05 22:15 
GeneralRe: how to draw a pie chart and graph in vc++ Pin
ThatsAlok6-Nov-05 22:52
ThatsAlok6-Nov-05 22:52 
GeneralRe: how to draw a pie chart and graph in vc++ Pin
ddmcr6-Nov-05 23:00
ddmcr6-Nov-05 23:00 

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.