Java Script Memory Management Questions

Discussion in 'Javascript' started by george xu, Feb 10, 2004.

  1. george xu

    george xu Guest

    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
    george xu, Feb 10, 2004
    #1
    1. Advertising

  2. george xu wrote:
    > 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


    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
    Brian Genisio, Feb 10, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Floris van Haaster

    Project management / bug management

    Floris van Haaster, Sep 23, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    1,229
    Jon Paal
    Sep 23, 2005
  2. pouet
    Replies:
    2
    Views:
    737
    Will Hartung
    Jul 30, 2004
  3. vansky
    Replies:
    7
    Views:
    588
    JustBoo
    Jan 13, 2006
  4. Zed A. Shaw
    Replies:
    5
    Views:
    138
    Matthew Desmarais
    Jul 8, 2005
  5. Matt Oefinger
    Replies:
    0
    Views:
    205
    Matt Oefinger
    Jun 25, 2003
Loading...

Share This Page