Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
100% Quality Score
Upvotes Received
2
Posts with Upvotes
2
Upvoting Members
1
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
0 Endorsements
~456 People Reached
Favorite Forums
Favorite Tags
c++ x 4
c x 1
Member Avatar for littletimmy

Hi all, If I want to check if memory has already been alocated to a pointer, and if it has I wnat ot delete it, is this how it would work? theGraph = new MyObject[size()]; if (theGraph != 0){ // or even NULL delete[] theGraph; } This seems intuitive to …

Member Avatar for Dave Sinkula
1
183
Member Avatar for littletimmy

If a 2d array is allocated memory in this fashion, how should it be deleted? MyObject **lastJobs, **lastMachines ; lastJobs = new MyObject*[getNbJobs()] ; lastMachines = new MyObject*[getGreatestMachineNb()] ; does this suffice: delete[] lastJobs; delete[] lastMachines;

Member Avatar for littletimmy
0
145
Member Avatar for littletimmy

I have a problem which is outlined below. I get an unhelpful memory dump. I have 2 questions. Why doesn't the memory dump contain the line number as it should. And why am I geting memory dumps without ever using new or malloc or any such functions. This is being …

1
128