1. A computer-implemented method performed by a data processing apparatus, comprising: receiving, by a first process and from a second process that is asynchronous to the first process: a request to perform operations; and a first callback referencing an executable portion of the second process; generating a wrapper callback referencing the first callback, the wrapper callback configured to deallocate a referenced memory location and cause execution of the referenced first callback when the wrapper callback is executed; and in response to performing the operations based on the request, the operations including allocating the referenced memory location, executing the wrapper callback, including executing the first callback and deallocating the referenced memory location subsequent to executing the first callback.