4 ms·
I've actually used this system as a student in a programming language design class, in which we had to implement semispace and mark-and-sweep collectors. I had
by gliese1337 14y ago
I've actually used this system as a student in a programming language design class, in which we had to implement semispace and mark-and-sweep collectors. I had the misfortune (unique in 2 sections of the class that semester) of running into a bug in the framework, but I believe that got fixed, and it was otherwise pretty dang cool.
- seivan 14y agoWe used C++ to write a game and _SOMEHOW_ without knowing properly about how GC worked - learned to write our own garbage collectors for projectiles that went out of screen and enemies that died. :) It was basically the eye opener for how GC's worked. Though I am sure it's faaaaaar more complicated than the Sets we used to keep track. It still made me better at manually handling memory. That being said, I prefer GC and/or Automatic Reference Counting at compile time. Still though, it was a nice "feeling" to manage your own memory in an (incredibly small) project.
- malkia 14y ago"GC and/or Automatic Reference Counting at compile time" - What do you mean by that?
- bennyg 14y agoHe's probably talking about ARC for Objective-C, that automatically releases references and allocations when it's impossible for those allocations to be used again in scope.
- seivan 14y agoHeh, I would have thought spelling the acronym out might be more clear than just typing ARC.
- shin_lao 14y agoSmart pointers: http://en.wikipedia.org/wiki/Smart_pointer#C.2B.2B_smart_pointers http://en.wikipedia.org/wiki/Smart_pointer#C.2B.2B_smart_poi... and RAII http://en.wikipedia.org/wiki/RAII#C.2B.2B_example http://en.wikipedia.org/wiki/RAII#C.2B.2B_example