Skip to content

Commit

Permalink
Update rbimgui-2.lua
Browse files Browse the repository at this point in the history
  • Loading branch information
Singularity5490 authored Oct 6, 2022
1 parent f94e413 commit 4f620bc
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions rbimgui-2.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2317,12 +2317,14 @@ local library library = {
self.switch()
end)

local folderCache = { }
function self.new(type, typeOptions)
assert(typeof(type) == "string", "expected string as #1 argument")
type = type:lower()
local p = rawget(types, type)
assert(p, "invalid type")
local o = p(typeOptions)
table.insert(folderCache, o)
o.type = type
o.self.Parent = folderItems

Expand Down Expand Up @@ -2352,6 +2354,9 @@ local library library = {
self.updated = folder:GetPropertyChangedSignal("Size")

function self:Destroy()
for i, v in next, folderCache do
v:Destroy()
end
folder:Destroy()
end

Expand Down

0 comments on commit 4f620bc

Please sign in to comment.