|
|
|||||||
| Computers & Information Technologies « Everything related to computers and internet. » |
![]() |
|
|
Share | Thread Tools | Search this Thread |
|
|
#11 |
|
Registered Member
Last Online: 05-30-2010
Join Date: Dec 2006
Posts: 131
Thanks: 1
Thanked 3 Times in 2 Posts
Groans: 0
Groaned at 0 Times in 0 Posts
|
Thanx ZeRaW, i totally missed that one, that would definitely cause a memory leak.
You must explicity delete all object you create with new. Only automatic, static or global variables are deleted automatically by the compiler... Thank you again for the correction.
__________________
Cheers, Simon Last edited by sayo9394; 01-11-2007 at 01:53 AM. |
|
|
|
|
|
#12 |
|
Super Moderator
Last Online: 02-16-2022
Join Date: May 2006
Posts: 5,580
Thanks: 1,888
Thanked 2,653 Times in 1,593 Posts
Groans: 55
Groaned at 35 Times in 32 Posts
|
first, i have not taken pointer, and never saw the statement ""new"".
and second, i dont like global variables, but chriseid06 declared them, and the only thing i did is that i corrected his code with minimum changes, just to let the guy see where his mistakes are. cuz posting such program here, means that he did not understand the errors given by the compiler. if it was for me i'd maybe do it sayo's way, but maybe with different names thanx sayo, e7tirametna
__________________
click on 'Groan' to switch to my left testicle. |
|
|
|
|
|
#13 |
|
Registered Member
Last Online: 04-15-2018
Join Date: Aug 2006
Posts: 1,549
Thanks: 31
Thanked 213 Times in 151 Posts
Groans: 0
Groaned at 1 Time in 1 Post
|
|
|
|
|
![]() |
|
| Tags |
| helpc |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
|
|