Hi,
I'm used to C/C++ where if you "new" something you really need to "delete"
it later. Is that also true in javascript? if i do "mydate = new date();"
in a function and dont "delete mydate" when the function exits do i have a
memory leak or other trouble brewing?
ie:
function MyFn() {
var mydate;
mydate = new date();
}
does the above function present a problem (what if its called over and over
and over etc)? or is the allocation automaticaly freed on function exit?
Thanks
Eric
I'm used to C/C++ where if you "new" something you really need to "delete"
it later. Is that also true in javascript? if i do "mydate = new date();"
in a function and dont "delete mydate" when the function exits do i have a
memory leak or other trouble brewing?
ie:
function MyFn() {
var mydate;
mydate = new date();
}
does the above function present a problem (what if its called over and over
and over etc)? or is the allocation automaticaly freed on function exit?
Thanks
Eric
Comment