SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    ********* obeah makeda's Avatar
    Join Date
    Jun 2001
    Location
    rollin' on dubs
    Posts
    492
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    releasing objects

    With javascript, how do you release the memory stored in objects when you're done with them? I am instantiating a couple of objects to test if my .cab files came down correctly. if no errors are thrown, i want to destroy my objects. How do I do that? Do I just set it equal to null?

    Ex.
    <object codename="oMyObject" classid="xxxxxxxxx"></object>

    <script language="javascript">
    try {
    var oMyObject = new ActiveXObject("program.id");
    oMyObject = null;
    }
    catch {
    document.write("could not instantiate object");
    }
    </script>

  2. #2
    ********* obeah makeda's Avatar
    Join Date
    Jun 2001
    Location
    rollin' on dubs
    Posts
    492
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i think i answered my own question. setting them equal to null doesn't create any new errors so i guess its working.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •