Skip to content

Instantly share code, notes, and snippets.

@christianwimmer
Created October 20, 2018 20:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save christianwimmer/a3f7296206e2e6d6d8f134ac02382e38 to your computer and use it in GitHub Desktop.
Save christianwimmer/a3f7296206e2e6d6d8f134ac02382e38 to your computer and use it in GitHub Desktop.
static ByteBuffer plotAsSVGInNewIsolate(String function, double xmin, double xmax) {
/* Create a new isolate for the function evaluation and rendering. */
IsolateThread renderingContext = Isolates.createIsolate(CreateIsolateParameters.getDefault());
/* Render the function in the new isolate. */
...
/* Tear down the isolate, freeing all the temporary objects. */
Isolates.tearDownIsolate(renderingContext);
return result;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment