Comments (5)
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.
You're welcome!
I tried to take into account that Tuple
s 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.
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.
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.
Great! You're very welcome. Your latest commit fixes the bug for me. π
from cello.
Related Issues (20)
- Make install should use "install --mode=..." instead of "cp" HOT 2
- make install doesn't install the dynamic library
- How do one "extends" a type? HOT 3
- error: cast to pointer from integer of different size HOT 2
- pop semantics? HOT 3
- Append Char HOT 2
- MacOS: __dyld section not supported HOT 1
- Abstracting a scripting language's internal value types using Cello HOT 1
- Feature request : Lua->Cello transpiler
- Missing Git tag for 2.1.0 release HOT 2
- Can I make a wrapper for other languages?
- Add vcpkg installation instructions
- Question about Array
- Doesn't work with Emscripten HOT 2
- is the project alive? can I use it in my product? who develops forks based on Cello? HOT 3
- Moving objects between threads HOT 1
- Failed to compile on GCC 8.1.0
- Can you do a comparison to Nim and Nelua?
- new release? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cello.