If I make a variable into the memory heap will it keep
its value like when I declare a static variable which
keeps any value stored in it for the life of the program?
[Solved] Question on memory heap
Moderator: Coders of Rage
- zodiac976
- Chaos Rift Regular
- Posts: 156
- Joined: Thu Jun 18, 2009 10:03 am
- Current Project: Booklet & Text RPG
- Favorite Gaming Platforms: PC, PS3, PSP
- Programming Language of Choice: C++
- Location: AL
- Contact:
[Solved] Question on memory heap
Last edited by zodiac976 on Mon Jun 29, 2009 8:08 pm, edited 1 time in total.
Re: Question on memory heap
no offence. but you need to ask google these kinda things. you will get the answer alot quicker. and google wont give you asshole remarks like me.
Some person, "I have a black belt in karate"
Dad, "Yea well I have a fan belt in street fighting"
Dad, "Yea well I have a fan belt in street fighting"
- zodiac976
- Chaos Rift Regular
- Posts: 156
- Joined: Thu Jun 18, 2009 10:03 am
- Current Project: Booklet & Text RPG
- Favorite Gaming Platforms: PC, PS3, PSP
- Programming Language of Choice: C++
- Location: AL
- Contact:
Re: Question on memory heap
Yea I should just use google and not post any questions anymore.
Re: Question on memory heap
dont be a little baby about it. i didnt say never ask anything. i said these kinda questions. arent you like in your mid 20's.. and still acting like a little girl that just had her first period in gym class. grow a sack.zodiac976 wrote:Yea I should just use google and not post any questions anymore.
Some person, "I have a black belt in karate"
Dad, "Yea well I have a fan belt in street fighting"
Dad, "Yea well I have a fan belt in street fighting"
Re: Question on memory heap
Avan is , sorta, right, these kind of questions would be better for google, it's a very short question easily searched on google... it would take ten seconds on their apposed to 5 minutes for a first post like avans, and then another 12 minute argument, then an answer that someone else got from google....

- MarauderIIC
- Respected Programmer
- Posts: 3406
- Joined: Sat Jul 10, 2004 3:05 pm
- Location: Maryland, USA
Re: Question on memory heap
Yes but once the pointer to it goes out of scope, you effectively won't be able to access it anymore. Which means you won't be able to delete it. Which means you'll have a memory leak. (Every new that is executed must have an accompanying delete.)zodiac976 wrote:If I make a variable into the memory heap will it keep
its value like when I declare a static variable which
keeps any value stored in it for the life of the program?
I realized the moment I fell into the fissure that the book would not be destroyed as I had planned.