mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-20 19:40:43 +00:00
removed system.free
This commit is contained in:
@@ -1509,8 +1509,7 @@ when not defined(nimrodVM):
|
||||
## or other memory may be corrupted.
|
||||
## The freed memory must belong to its allocating thread!
|
||||
## Use `deallocShared` to deallocate from a shared heap.
|
||||
proc free*[T](p: ptr T) {.inline, benign.} =
|
||||
dealloc(p)
|
||||
|
||||
proc allocShared*(size: Natural): pointer {.noconv, rtl, benign.}
|
||||
## allocates a new memory block on the shared heap with at
|
||||
## least ``size`` bytes. The block has to be freed with
|
||||
|
||||
@@ -40,6 +40,8 @@ News
|
||||
``varargs[expr]`` instead. The same applies to ``varargs[typed]`` vs
|
||||
``varargs[stmt]``.
|
||||
- ``sequtils.delete`` doesn't take confusing default arguments anymore.
|
||||
- ``system.free`` was an error-prone alias to ``system.dealloc`` and has
|
||||
been removed.
|
||||
|
||||
|
||||
Library additions
|
||||
|
||||
Reference in New Issue
Block a user