- Joined
- Dec 31, 2007
- Messages
- 780
lets start by the beginning
(**skip this.... its just how i got up to here**)
im starting to study at the university how to program... last week we saw pointers, and a lot of things came up to my mind.
(**up to here**)
thinking a bit about leaks, jass, calls and thingys these questions came to me:
Points are pointers. arent they?
pointers needs to be removed for the information that they are pointing to might be removed from memory (else lag and things will happen bla bla bla)
i heard that if you replace the information stored in a pointer for new information (not another variable) you dont need to remove the pointer coz the link is gonna be erased anyways.
this made me think about locations
why should we remove locations when giving them a new value?
is that the new values we are giving them (for ie. Position of unit) are pointers?
in the position of unit i mentioned. Does it call a function that returns a pointer and assigns it to the point variable? and that is the reason for us to remove the location variable before re-assigning it?
if WE works with functions. Why pointers are not deleted automatically after the function has ended?
may this be the reason for a lot of people complaining about WE not having something about a "garbage collector" or sort of that?
Side note: i know nothing (except for some function calls) about jass, i read absolutely nothing about jass... all this came to me when i understood a bit about dinamic memory
thy for reading ^^
(**skip this.... its just how i got up to here**)
im starting to study at the university how to program... last week we saw pointers, and a lot of things came up to my mind.
(**up to here**)
thinking a bit about leaks, jass, calls and thingys these questions came to me:
Points are pointers. arent they?
pointers needs to be removed for the information that they are pointing to might be removed from memory (else lag and things will happen bla bla bla)
i heard that if you replace the information stored in a pointer for new information (not another variable) you dont need to remove the pointer coz the link is gonna be erased anyways.
this made me think about locations
why should we remove locations when giving them a new value?
is that the new values we are giving them (for ie. Position of unit) are pointers?
in the position of unit i mentioned. Does it call a function that returns a pointer and assigns it to the point variable? and that is the reason for us to remove the location variable before re-assigning it?
if WE works with functions. Why pointers are not deleted automatically after the function has ended?
may this be the reason for a lot of people complaining about WE not having something about a "garbage collector" or sort of that?
Side note: i know nothing (except for some function calls) about jass, i read absolutely nothing about jass... all this came to me when i understood a bit about dinamic memory
thy for reading ^^