![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
lua
QQ276592716
这个作者很懒,什么都没留下…
展开
-
Object Orientation Tutorial
Lua is not really an object-oriented language, and it doesn't have a built-in concept of classes. But it is easily possible to create your own class system using tables and metatables.Simple metat转载 2014-09-26 23:16:48 · 677 阅读 · 0 评论 -
tolua++实现分析
tolua_register_gc转载 2014-11-09 20:09:36 · 647 阅读 · 0 评论 -
协程coroutine资料更新
以前有一个 http://sunxiunan.com/?p=1949 这里加上一些新看到的内容,也许有重复。http://sdiehl.github.com/coroutine-tutorial/ coroutine-tutorialhttp://www.chiark.greenend.org.uk/~sgtatham/coroutines.htmlhttp://blog.转载 2014-12-21 00:36:23 · 1061 阅读 · 0 评论 -
探索Lua5.2内部实现:Garbage Collection(2)
原文:http://blog.csdn.net/yuanlin2008/article/details/8684869GCObjectLua使用union GCObject来表示所有的垃圾回收对象:[cpp] view plaincopyprint?182 /* 183 ** Union of all collecta转载 2014-12-21 19:18:16 · 803 阅读 · 0 评论 -
探索Lua5.2内部实现:Garbage Collection(1)
Lua5.2采用垃圾回收机制对所有的lua对象(GCObject)进行管理。Lua虚拟机会定期运行GC,释放掉已经不再被被引用到的lua对象。基本算法基本的垃圾回收算法被称为"mark-and-sweep"算法。算法本身其实很简单。首先,系统管理着所有已经创建了的对象。每个对象都有对其他对象的引用。root集合代表着已知的系统级别的对象引用。我们从root集合出发,就可以访转载 2014-12-21 18:18:24 · 647 阅读 · 0 评论 -
Lua源码剖析-GC
这次主要来分析lua的gc。首先lua中的数据类型包括下面9种,ni, Boolean, number, string, table,user data, thread , functions 以及 lightusedata.其中 string, table,thread , function 是会被垃圾回收管理的,其他的都是值存在。因此我们来看对应的GC数据结构.转载 2014-12-22 01:06:05 · 1110 阅读 · 0 评论