chiark
/
gitweb
/
~mdw
/
sod
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
d7451ac
)
doc/concepts.tex: Warn about allocating resources in init methods.
author
Mark Wooding
<mdw@distorted.org.uk>
Wed, 2 Aug 2017 09:52:06 +0000
(10:52 +0100)
committer
Mark Wooding
<mdw@distorted.org.uk>
Fri, 8 Jun 2018 18:58:40 +0000
(19:58 +0100)
doc/concepts.tex
patch
|
blob
|
blame
|
history
diff --git
a/doc/concepts.tex
b/doc/concepts.tex
index f7283e4a6069d781f5eb35af81d79257a375fd55..b48746eb138639fd77a9fe1354da89b3afa74647 100644
(file)
--- 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
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
Initialization is performed by sending the imprinted instance an @|init|
message, defined by the @|SodObject| class. This message uses a nonstandard