mercredi 24 décembre 2014

Memory deallocation in TypeScript


I have a variable oneDay for which I have assigned an integer number



var oneDay = 24 * 60 * 60 * 1000; // hours*minutes*seconds*milliseconds


I'm releasing the memory occupied by oneDay using the below syntax at the end of the function termination in which the code has been declared.



var oneDay=null;


The error that I'm getting :



error TS2134: Subsequent variable declarations must have the same type. Variable 'oneDay ' must be of type 'Date', but here has type 'null'.



What could be the possible solution for this??Thanks





Aucun commentaire:

Enregistrer un commentaire