samdze / playdate-nim

Nim bindings with extra features for the Playdate SDK
66 stars 3 forks source link

Don't use refs for unmanaged bitmaps #84

Open Nycto opened 1 month ago

Nycto commented 1 month ago

This reduces the number of small memory allocations that happens when working with bitmaps. Bitmaps are split into two categories: managed and unmanaged. Unmanaged bitmaps are passed around by copying pointers, managed bitmaps are passed around using nim object refs.