Navigation Menu

Skip to content

Commit

Permalink
Add temporary Gc.minor workaround in UIEventCallback
Browse files Browse the repository at this point in the history
  • Loading branch information
wokalski committed Apr 3, 2019
1 parent 44d7d95 commit 1a0797e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions renderer-macos/lib/bindings/UIEventCallback.re
@@ -1,5 +1,11 @@
let make = (callback, ()) => {
callback();
/* This is a workaround for non-deterministic crashes
* when OCaml wants to allocate huge amounts of memory.
* This crash still happens but is a lot less frequent.
* A very negative side effect is terrible performance.
*/
Gc.minor();
Brisk.UI.flushPendingUpdates();
Brisk.UI.executeHostViewUpdatesAndLayout();
LwtFakeIOEvent.send();
Expand Down

0 comments on commit 1a0797e

Please sign in to comment.