From d1b394fa5cde326c2635997ddb7cda27a52d537d Mon Sep 17 00:00:00 2001 Message-Id: From: Mark Wooding Date: Wed, 2 Aug 2017 10:52:06 +0100 Subject: [PATCH] doc/concepts.tex: Warn about allocating resources in init methods. Organization: Straylight/Edgeware From: Mark Wooding --- doc/concepts.tex | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/doc/concepts.tex b/doc/concepts.tex index f7283e4..b48746e 100644 --- a/doc/concepts.tex +++ b/doc/concepts.tex @@ -741,7 +741,11 @@ environment in which it operates. Details of initialization are necessarily class-specific, but typically it involves setting the instance's slots to appropriate values, and possibly -linking it into some larger data structure to keep track of it. +linking it into some larger data structure to keep track of it. It is +possible for initialization methods to attempt to allocate resources, but +this must be done carefully: there is currently no way to report an error +from object initialization, so the object must be marked as incompletely +initialized, and left in a state where it will be safe to tear down later. Initialization is performed by sending the imprinted instance an @|init| message, defined by the @|SodObject| class. This message uses a nonstandard -- [mdw]