# Allocates and clears *size* bytes of memory.
#
# The resulting object may contain pointers and they will be tracked by the GC.
#
# The memory will be automatically deallocated when unreferenced.
However, the gc_none implementation simply delegates this method to LibC.malloc - which doesn't clear the memory.
To fix this, either an explicit clear could be added, or the malloc could be replaced by a calloc.
Bug Report
The method
GC#malloc
is described as follows:However, the
gc_none
implementation simply delegates this method toLibC.malloc
- which doesn't clear the memory.To fix this, either an explicit
clear
could be added, or themalloc
could be replaced by acalloc
.