Git Product home page Git Product logo

Comments (5)

orangeduck avatar orangeduck commented on August 17, 2024

Thanks for the detailed report. I will have to dig a little bit deeper to see exactly what is wrong but I think this is to do with the fact that tuples are not real value types and actually only contain pointers to the objects inside of them (tuple was a terrible name in retrospect since you assume it will be a value-like type) so it may be pointing to a stack allocated object which get cleaned up or overwritten or has some other odd behavior...

Either way it doesn't seem good to use a tuple as a key type. Perhaps you can use an Array instead for now until I find out what exactly is wrong?

from cello.

dbohdan avatar dbohdan commented on August 17, 2024

You're welcome!

I tried to take into account that Tuples were just arrays of pointers by allocating everything I put in them on the heap with new, like in my example. What I was surprised by was that despite Tuple implementing Mark an object being in a Tuple didn't seem to count towards its reachability.

Thanks for the suggestion to use Array. I'll do that.

from cello.

orangeduck avatar orangeduck commented on August 17, 2024

After a bit more investigation I think this is actually a bad bug to do with the GC. Looking into it more now...

from cello.

orangeduck avatar orangeduck commented on August 17, 2024

Okay I think I have a temp fix included in a0fa757 but I will probably need to look again at some point to clean up the interface to the GC to make this sort of thing easier and more efficient. Many thanks for the bug report!

from cello.

dbohdan avatar dbohdan commented on August 17, 2024

Great! You're very welcome. Your latest commit fixes the bug for me. πŸ‘

from cello.

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.