Gerald Lester <
Gerald...@kng-consulting.net> wrote:
> On 01/24/2018 05:19 PM, Jim wrote:
>> On 1/23/2018 7:45 PM, Gerald Lester wrote:
>>> Technically, the Tcl scripts are not leaking memory -- they just are
>>> not cleaning up after themselves.
>>
>> This is mostly going to be a user inflicted wound, right? As opposed to
>> say an inherent memory cleanup issue that tcl suffers by design or
>> implementation. In otherwords, it's not tcl specific in any way...
>>
>> And an effective strategy for memory clean-up:
>> Had the 'script' been encapsulated inside of a procedure, one
>> example, and a call made to that procedure -- then the memory would be
>> returned when the call returns and the 'scripts' would be effectively
>> cleaning up after themselves...(except for variables declared to be
>> global vs local, etc).
>
> Correct, unless the memory is being used by commands, e.g. doms created
> by tDOM or TclOO since they are all commands.