[Gambas-user] [Gambas Bug Tracker] Bug #1223: BUG Temporary directory created by Gambas during TASK.

bugtracker at gambaswiki.org bugtracker at gambaswiki.org
Sat Jan 20 20:56:08 CET 2018


http://gambaswiki.org/bugtracker/edit?object=BUG.1223&from=L21haW4-

Comment #15 by Benoît MINISINI:

Just pull the latest commit, and recompile. Tasks won't emit any memory warning anymore.

As task is a fork of a current running Gambas process, it inherits the memory state of its parent. So you get allocated objects that you can't explicitly free. If you want the real details, look at the man page of the fork() system call.

I could make Task execute the interpreter after the fork(), so that it starts in a clean state like any other Gambas process. But I prefer just make a fork(), even if it generates its own potential problems, because:

- It's faster.

- You can access all objects of the parent process, which allows sending arguments to the task fast.




More information about the User mailing list