[Gambas-user] _free() event not firing when object has a Handle on a Process

T Lee Davidson t.lee.davidson at gmail.com
Sun Feb 2 20:03:35 CET 2020


I have a class (TestClass) that, in its _new() method, spawns a SHELL Process with `ispell` in pipe mode:
$pServerInstance = Shell "ispell -a"

The class also has a _free() method that kills the Process:
If $pServerInstance Then $pServerInstance.Kill

I create an object of the class in the main form with:
TestObject = New TestClass

But, when I destroy the object, "TestObject = Null", the _free() method does not get called. This means the Process does not get 
killed, and the application hangs.

Is this a bug, or just bad programming practice on my part?


-- 
Lee
-------------- next part --------------
A non-text attachment was scrubbed...
Name: TestGraphical-0.0.24.tar.gz
Type: application/gzip
Size: 29532 bytes
Desc: not available
URL: <https://lists.gambas-basic.org/pipermail/user/attachments/20200202/37eb0959/attachment-0001.gz>


More information about the User mailing list