mirror of
https://github.com/AmberGraceRblx/luau-promise.git
synced 2025-04-24 23:50:03 +00:00
Fix #39
This commit is contained in:
parent
a4256062a0
commit
e7a01c7bed
2 changed files with 5 additions and 0 deletions
|
@ -4,6 +4,7 @@
|
||||||
### Fixed
|
### Fixed
|
||||||
- Make `Promise.is` work with promises from old versions of the library (#41)
|
- Make `Promise.is` work with promises from old versions of the library (#41)
|
||||||
- Make `Promise.delay` properly break out of the current loop (#40)
|
- Make `Promise.delay` properly break out of the current loop (#40)
|
||||||
|
- Allow upvalues captured by queued callbacks to be garbage collected when the Promise resolves by deleting the queues when the Promise settles (#39)
|
||||||
|
|
||||||
## [3.0.0] - 2020-08-17
|
## [3.0.0] - 2020-08-17
|
||||||
### Changed
|
### Changed
|
||||||
|
|
|
@ -1292,6 +1292,10 @@ function Promise.prototype:_finalize()
|
||||||
coroutine.wrap(callback)(self._status)
|
coroutine.wrap(callback)(self._status)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
self._queuedFinally = nil
|
||||||
|
self._queuedReject = nil
|
||||||
|
self._queuedResolve = nil
|
||||||
|
|
||||||
-- Clear references to other Promises to allow gc
|
-- Clear references to other Promises to allow gc
|
||||||
if not Promise.TEST then
|
if not Promise.TEST then
|
||||||
self._parent = nil
|
self._parent = nil
|
||||||
|
|
Loading…
Reference in a new issue