51 ms·
How would one explicitly allocate space for a closure? (That is, in such a way that one could handle allocation failure.) I can't find any examples nor any hint
by wahern 10y ago
How would one explicitly allocate space for a closure? (That is, in such a way that one could handle allocation failure.) I can't find any examples nor any hints about what the syntax might look like.
- steveklabnik 10y agoClosures are stack allocated unless you wrap them in something like a Box, so it's up to you. They're no different than any other value.