You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, SDL resources are handled with pointers directly, with this the API inherits all the risks associated with pointers, like use-after-free, double-free, dangling pointers, etc.
Also, there's some needed care in order to generate bindings correctly for these pointers.
Of course, pointers are a essential when programming games, especially in performance-sensitive code, however, one of the major goals of Nene it's to make game programming simpler (quite like when programming a game on a scripting language).
Thus, on the API side, Nene will stop using pointers and change for generational indexes.
This concept are described on some blogposts, in general, "floooh" described very well this concept on Handles are the better pointers article.
With that, not only binding generation gets simpler and usage gets safer, it would also be possible to detect use-after-frees, double-frees, etc. with runtime checking, and general shutdown gets simpler with no leaks.
The downside it's the performance price, but again, Nene it's meant for quite simple (or just average) indie games, not a million-objects benchmark.
The text was updated successfully, but these errors were encountered:
Currently, SDL resources are handled with pointers directly, with this the API inherits all the risks associated with pointers, like use-after-free, double-free, dangling pointers, etc.
Also, there's some needed care in order to generate bindings correctly for these pointers.
nene/include/nene/font.h
Lines 18 to 20 in 407a276
Of course, pointers are a essential when programming games, especially in performance-sensitive code, however, one of the major goals of Nene it's to make game programming simpler (quite like when programming a game on a scripting language).
Thus, on the API side, Nene will stop using pointers and change for generational indexes.
This concept are described on some blogposts, in general, "floooh" described very well this concept on Handles are the better pointers article.
With that, not only binding generation gets simpler and usage gets safer, it would also be possible to detect use-after-frees, double-frees, etc. with runtime checking, and general shutdown gets simpler with no leaks.
The downside it's the performance price, but again, Nene it's meant for quite simple (or just average) indie games, not a million-objects benchmark.
The text was updated successfully, but these errors were encountered: