Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: a2aa4ed7987474a17908d564487cb579edd62ca0
Ticket: 229181ffffffffffffffffffffffffffffffffff
Compiler Leaks Memory
User & Date: dkf on 2001-01-18 17:11:31
Changes

  1. closedate changed to: "2001-01-18T10:11:31"
  2. closer changed to: "dkf"
  3. icomment:
    The code, as written, is failing to call Tcl_IncrRefCount prior to calling Tcl_EvalObjEx amd Tcl_DecrRefCount afterwards.  Add these calls and everything will be hunky-dory (assuming the string returned by GetScript() is cleaned up right too, of course.)
    
    while(1){ 
        char* theScript = GetScript(); 
        returnLength = NPstrlen( theScript ); 
        theObj = Tcl_NewUnicodeObj(theScript, returnLength ); 
    
        Tcl_IncrRefCount(theObj);
        Tcl_EvalObjEx(theInterp, theObj , TCL_EVAL_DIRECT ); 
        Tcl_DecrRefCount(theObj);
    } 
    
    
  4. login: "dkf"
  5. mimetype: "text/plain"
  6. resolution changed to: "Invalid"
  7. status changed to: "Closed"
  8. username: "dkf"