Giter VIP home page Giter VIP logo

Comments (3)

kareman avatar kareman commented on May 24, 2024

I assume this is for stress testing purposes?

Each run opens 2 Pipes (for stdout and stderror), and each of those has 2 FileHandles. I assume this is where the open files come from. To test this, try using runAndPrint instead, it uses your application's own stdout and stderror.

Even so, I don't think the files should be kept open after the output from run has been discarded. I'm on Easter vacation for 1,5 weeks now, but I'll take a look at it when I get back.

from swiftshell.

jimmyzzzzzzz avatar jimmyzzzzzzz commented on May 24, 2024

After more investigation on this issue recently, the memory leak seems to be inevitable. Even if I create a simple Process without a Pipe and set its stdin, stdout and stderr to nil, it still leaks after its termination. The problem seems to be related to apple's own Process Api. However the open files can be fixed by closing all file handles after process terminates and it resolves the main source of memory leaks in my case.

from swiftshell.

kareman avatar kareman commented on May 24, 2024

Thanks, I'll look into having swiftshell close all file handles manually after a Process finishes.

from swiftshell.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.