Skip to content

Commit

Permalink
Merge pull request #172 from Sleitnick/bugfix/component-watch-handle
Browse files Browse the repository at this point in the history
Fix trove mem leak
  • Loading branch information
Sleitnick authored Nov 1, 2023
2 parents a261ebd + 7114abc commit 2ee4399
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions modules/component/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -169,10 +169,10 @@ type ComponentConfig = {
local CollectionService = game:GetService("CollectionService")
local RunService = game:GetService("RunService")

local Promise = require(script.Parent.Promise)
local Signal = require(script.Parent.Signal)
local Symbol = require(script.Parent.Symbol)
local Trove = require(script.Parent.Trove)
local Promise = require(script.Parent.Promise)

local IS_SERVER = RunService:IsServer()
local DEFAULT_ANCESTORS = { workspace, game:GetService("Players") }
Expand Down Expand Up @@ -469,8 +469,8 @@ function Component:_setup()
local function InstanceUntagged(instance: Instance)
local watchHandle = watchingInstances[instance]
if watchHandle then
watchHandle:Disconnect()
watchingInstances[instance] = nil
self[KEY_TROVE]:Remove(watchHandle)
end
TryDeconstructComponent(instance)
end
Expand Down
6 changes: 3 additions & 3 deletions modules/component/wally.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
[package]
name = "sleitnick/component"
description = "Component class"
version = "2.4.6"
version = "2.4.7"
license = "MIT"
authors = ["Stephen Leitnick"]
registry = "https://github.com/UpliftGames/wally-index"
realm = "shared"

[dependencies]
Signal = "sleitnick/signal@^1"
Signal = "sleitnick/signal@^2"
Symbol = "sleitnick/symbol@^2"
Trove = "sleitnick/trove@^0.4"
Trove = "sleitnick/trove@^1"
Promise = "evaera/promise@^4"

0 comments on commit 2ee4399

Please sign in to comment.