On Mon, Sep 02, 2013 at 10:11:28AM +0200, Jacob Carlborg wrote:
> On 2013-09-01 19:54, Walter Bright wrote:
> >On 9/1/2013 2:50 AM, deadalnix wrote:
> >>Considering DMD never deallocate anything, expect to restart your
> >>IDE every hour or so.
> >
> >DMD deallocates everything when its process ends. This should have
> >zero effect on the IDE. If you need to restart the IDE every hour, it
> >is not because of DMD.
> 
> That was in reply to if DMD was built as a library and included in the
> IDE. Then there wouldn't be a process to end.
[...]

        module libDmd;
        auto parseDCode(string code) {
                pid_t pid;
                if ((pid=fork())==0) {
                        dmdMain(...);
                        exit(0);
                } else {
                        auto status = waitpid(pid);
                        return getReturnValue(...);
                }
                throw Exception("fork error");
        }

Though, granted, this may cause unacceptable performance hits. :-P


T

-- 
The best way to destroy a cause is to defend it poorly.

Reply via email to