Fix a (harmless) copy-paste typo
[lqt/mk.git] / test / mm.lua
blob7afd6fbfe56a31865f0883bc39b6220ee51a431e
1 #!/usr/bin/lua
3 require'qtcore'
5 qapp = QCoreApplication(1+select("#", ...), {arg[0], ...})
7 local N = 1
8 local qo = nil
9 local del = QObject.delete
10 for i = 1, 10*N do
11 qo = QObject(qo)
12 print('created QObject', qo);
13 qo.delete = function(...) del(...) print('deleting', ...) end
14 qo.__gc = function(...) del(...) print('deleting', ...) end
15 end
17 -- [[
18 local t = {}
19 for i = 1, 10*N do
20 table.insert(t, qo)
21 print("getting parent", qo)
22 qo = qo:parent()
23 end
24 --]]
27 qo=nil
28 print('collecting')
29 collectgarbage("collect")
30 collectgarbage("collect")
31 print('processing')
32 qapp.processEvents()
33 t=nil
34 print('collecting')
35 collectgarbage("collect")
36 print('processing')
37 qapp.processEvents()
38 print('collecting')
39 collectgarbage("collect")