0

Possible Duplicate:
Deleting Objects in JavaScript

This is the demo code:

function a(){
    this.a='aaa'
}
var aa=new a

How to clear the aa object from the memory?

Community
  • 1
  • 1
zjm1126
  • 34,604
  • 53
  • 121
  • 166

2 Answers2

1

I may be wrong but I think setting the variable to null should do the trick.

Phil
  • 157,677
  • 23
  • 242
  • 245
1

set aa = null, alert(aa)!