Closed GoldenretriverYT closed 1 year ago
If you are using pointers with heap allocation, you need to increment the reference count manually
I am not using pointers - everything is managed
But manually incremeting sounds like something that could be a workaround for now
Might be fixed by https://github.com/CosmosOS/Cosmos/pull/2604 . There was an issue with large enough objects not being marked as in use
Yeah seems like that fixed it
and my os no longer leaks memory definitely one of the top 3 cosmos prs ever amazing job quajak
Area of Cosmos - What area of Cosmos are we dealing with?
Garbage Collector
Expected Behaviour - What do you think that should happen?
Buffer should not be collected
Actual Behaviour - What unexpectedly happens?
Buffer gets collected unless the TextField.VisibleIncludingParents is true the whole time. I assume this turning to false somehow makes the GC think that references to ScrollableTextFrame.Buffer have been removed, despite this not being the case.
Reproduction - How did you get this error to appear?
Version - Were you using the User Kit or Dev Kit? And what User Kit version or Dev Kit commit (Cosmos, IL2CPU, X#)?
Devkit latest
(sorry for the bad reproduction steps but this seems like a very specific edge case)