void index(HTTPServerRequest req, HTTPServerResponse res) { static const exc = new HTTPStatusException(HTTPStatus.NotFound); throw exc; } exc is created at compile time and put the tls init data. No gc heap activity is ever involved in creating it.