Click here to Skip to main content
16,020,459 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: how to delete arrays to save memery space c++ Pin
David Crow3-May-10 9:30
David Crow3-May-10 9:30 
GeneralRe: how to delete arrays to save memery space c++ Pin
mrby1233-May-10 9:54
mrby1233-May-10 9:54 
GeneralRe: how to delete arrays to save memery space c++ Pin
mrby1234-May-10 10:37
mrby1234-May-10 10:37 
GeneralRe: how to delete arrays to save memery space c++ Pin
David Crow5-May-10 2:40
David Crow5-May-10 2:40 
GeneralRe: how to delete arrays to save memery space c++ Pin
mrby1235-May-10 10:37
mrby1235-May-10 10:37 
GeneralRe: how to delete arrays to save memery space c++ Pin
mrby1235-May-10 11:07
mrby1235-May-10 11:07 
GeneralRe: how to delete arrays to save memery space c++ Pin
CPallini3-May-10 10:33
mveCPallini3-May-10 10:33 
GeneralRe: how to delete arrays to save memery space c++ Pin
mrby1234-May-10 8:43
mrby1234-May-10 8:43 
My intention is to release all memories. The following code was suggested by a guru. I tried however, seems a problem. I got error message when I run the program: (delete statements got problem).

"DAMAGE after normal block (#125) at 0x00E40610"

////////////////////////////////////////////////////////////////////////////
float **tim_va;

tim_va = new float*[1000];

for (int ix = 0; ix < 1000; ix++)
{
tim_va[ix] = new float[6];

for (int jy = 0; jy < 6; y++)
tim_va[ix][jy] = 0.0;
}

for (ix = 0; ix < 1000; ix++)
delete [] tim_va[ix];

delete [] tim_va;
//////////////////////////////////////////////////////////////////////////////
GeneralRe: how to delete arrays to save memery space c++ Pin
CPallini4-May-10 9:05
mveCPallini4-May-10 9:05 
GeneralRe: how to delete arrays to save memery space c++ Pin
mrby1234-May-10 9:16
mrby1234-May-10 9:16 
GeneralRe: how to delete arrays to save memery space c++ Pin
CPallini4-May-10 9:40
mveCPallini4-May-10 9:40 
GeneralRe: how to delete arrays to save memery space c++ Pin
mrby1234-May-10 9:50
mrby1234-May-10 9:50 
GeneralRe: how to delete arrays to save memery space c++ Pin
CPallini4-May-10 10:25
mveCPallini4-May-10 10:25 
GeneralRe: how to delete arrays to save memery space c++ Pin
mrby1234-May-10 10:53
mrby1234-May-10 10:53 
GeneralRe: how to delete arrays to save memery space c++ Pin
mrby1234-May-10 10:33
mrby1234-May-10 10:33 
AnswerOpenMP dilemma Pin
Chesnokov Yuriy3-May-10 5:17
professionalChesnokov Yuriy3-May-10 5:17 
GeneralRe: OpenMP dilemma Pin
Chris Losinger3-May-10 5:39
professionalChris Losinger3-May-10 5:39 
GeneralRe: For critical sections, #pragma omp single can be used as barriers. Pin
Software_Developer3-May-10 6:09
Software_Developer3-May-10 6:09 
QuestionHow to get my Application's coordinates? Pin
Software20073-May-10 4:25
Software20073-May-10 4:25 
AnswerRe: How to get my Application's coordinates? Pin
Rajesh R Subramanian3-May-10 4:29
professionalRajesh R Subramanian3-May-10 4:29 
GeneralRe: How to get my Application's coordinates? Pin
Software20073-May-10 4:46
Software20073-May-10 4:46 
QuestionResize controls in c++ win 32 Pin
arun_pk3-May-10 3:44
arun_pk3-May-10 3:44 
AnswerRe: Resize controls in c++ win 32 Pin
Cedric Moonen3-May-10 4:18
Cedric Moonen3-May-10 4:18 
GeneralRe: Resize controls in c++ win 32 Pin
arun_pk3-May-10 4:29
arun_pk3-May-10 4:29 
AnswerRe: Automatic resizing controls Pin
Software_Developer3-May-10 5:13
Software_Developer3-May-10 5:13 

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.