mirror of
https://github.com/aseprite/aseprite.git
synced 2024-12-28 15:20:15 +00:00
Test that the crash when we called print() on a __gc at exit is fixed
This commit is contained in:
parent
0fd04fd57f
commit
1db7233496
10
scripts/print_on_gc.lua
Normal file
10
scripts/print_on_gc.lua
Normal file
@ -0,0 +1,10 @@
|
||||
-- Copyright (C) 2019 Igara Studio S.A.
|
||||
--
|
||||
-- This file is released under the terms of the MIT license.
|
||||
-- Read LICENSE.txt for more information.
|
||||
|
||||
-- Create global variable which will be GC'd on lua_close()
|
||||
a = { }
|
||||
|
||||
-- Call print() on __gc, in previous version this produced a crash at exit
|
||||
setmetatable(a, { __gc=function() print('gc') end })
|
Loading…
Reference in New Issue
Block a user