@rbxts/rlog > LogContext > stop
LogContext.stop() method
Marks this context as dead, preventing any further usage.
Signature:
stop(): void;
Returns:
void
Remarks
Will make calls to the context manager to ensure there are no memory leaks.
Can safely be called multiple times, calling stop on an already dead instance will not throw an error.
Example
function GiveMoney(context: LogContext, player: Player, money: number) {
// ...
}
remotes.giveMoney.connect((player: Player, money: number) => {
const context = LogContext.start();
GiveMoney(context, player, money);
context.stop();
});