Luce packages
LuceLuce BaseLuciaOS

dymokomi/luce-browser-foundation

Source of release 0.6.1

0.6.1 / src / ak / default_delete.lucb

#==============================================================================================
#
#   default_delete - DefaultDelete<T>
#
#   DESCRIPTION:
#       Port of AK/DefaultDelete.h (lines 1-35). `delete t` returns the object to the
#       current allocator (the gc heap, DESIGN.md ยง3.3, where freeing is allowed as an
#       optimization).
#
#==============================================================================================

## Ported from AK/DefaultDelete.h:15 AK::DefaultDelete::operator().
pub func default_delete_call[T](this: DefaultDelete[T]*, t: T*?):
    _ = this
    if let object = t:
        free(object)