Skip to content

Commit

Permalink
Implement app.shutdown() function
Browse files Browse the repository at this point in the history
  • Loading branch information
janwirth authored and Jan Wirth committed Mar 3, 2022
1 parent 65cea00 commit df7162f
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/Elm/Kernel/Platform.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,14 @@ function _Platform_initialize(flagDecoder, args, init, update, subscriptions, st

_Platform_enqueueEffects(managers, initPair.b, subscriptions(model));

return ports ? { ports: ports } : {};
const shutdown = function() {
managers = null
model = null
stepper = null
ports = null
}

return ports ? { ports: ports, shutdown: shutdown } : { shutdown: shutdown };
}


Expand Down

0 comments on commit df7162f

Please sign in to comment.