Python1320

Untitled

Aug 1st, 2011
161
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.47 KB | None | 0 0
  1. local dls=setmetatable({}, { __mode = 'k' })
  2.  
  3. local t=getmetatable(HTTPGet())
  4. t.__gc__orig=t.__gc__orig or t.__gc
  5. function t:__gc()
  6.     print(self,dls[self],"gc!")
  7.     return t.__gc__orig(self)
  8. end
  9.  
  10. t.Download__orig=t.Download__orig or t.Download
  11. function t:Download(a,b,c)
  12.     dls[self]=a
  13.     return t.Download__orig(self,a,b,c)
  14. end
  15.  
  16.  
  17. timer.Create('1',0.1,200,function()  
  18. local a=HTTPGet()
  19. a:Download("http://0.0.0.0","",function()end)  
  20. end)
Advertisement
Add Comment
Please, Sign In to add comment