From 8094ef7a021f88c7413fd85d9f4c57f198217593 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Tue, 20 Jun 2017 09:28:10 -0600 Subject: [PATCH] clarify `free` docs: don't use with `malloc` modes other than 'raw Closes #1708 --- pkgs/racket-doc/scribblings/foreign/pointers.scrbl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/racket-doc/scribblings/foreign/pointers.scrbl b/pkgs/racket-doc/scribblings/foreign/pointers.scrbl index 86ddb160d0..c066210b6a 100644 --- a/pkgs/racket-doc/scribblings/foreign/pointers.scrbl +++ b/pkgs/racket-doc/scribblings/foreign/pointers.scrbl @@ -296,7 +296,11 @@ Uses the operating system's @cpp{free} function for library allocated and we should free. Note that this is useful as part of a finalizer (see below) procedure hook (e.g., on the Racket pointer object, freeing the memory when the pointer object is -collected, but beware of aliasing).} +collected, but beware of aliasing). + +Memory allocated with @racket[malloc] and modes other than +@racket['raw] must not be @racket[free]d, since those modes allocate +memory that is managed by the garbage collector.} @defproc[(end-stubborn-change [cptr cpointer?]) void?]{