Java Script Memory Management Questions

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • george xu

    Java Script Memory Management Questions

    Hi,

    I'm trying to find out how JavaScript manages its memory. In
    particular when using the 'new' operator to create an object is it
    necessary to explicitly delete this object (before it moves out of scope,
    like c++) or does JavaScript clean this up automatically?

    What about string varaible which uses concatenation extensively?

    Thanks.

    George
  • Brian Genisio

    #2
    Re: Java Script Memory Management Questions

    george xu wrote:[color=blue]
    > Hi,
    >
    > I'm trying to find out how JavaScript manages its memory. In
    > particular when using the 'new' operator to create an object is it
    > necessary to explicitly delete this object (before it moves out of scope,
    > like c++) or does JavaScript clean this up automatically?
    >
    > What about string varaible which uses concatenation extensively?
    >
    > Thanks.
    >
    > George[/color]

    Javascript has it's own garbage collection mechanism. You do not need
    to delete variables created with new. (I dont think you can)

    Strings follow the same model.

    Brian

    Comment

    Working...