锘??xml version="1.0" encoding="utf-8" standalone="yes"?>亚洲欧美伊人久久综合一区二区,久久青青草原精品国产软件,久久国产精品一区http://www.shnenglu.com/jaxe/category/17536.htmlFreeBSD銆丩inux涓嬮珮鎬ц兘緗戠粶娓告垙鏈嶅姟鍣ㄥ紑鍙?QQ275051)zh-cnThu, 11 Aug 2011 07:24:21 GMTThu, 11 Aug 2011 07:24:21 GMT60Lua鐨剋eak table鍜孶serdatahttp://www.shnenglu.com/jaxe/archive/2011/08/11/153054.html嫻╂瘺嫻╂瘺Thu, 11 Aug 2011 06:33:00 GMThttp://www.shnenglu.com/jaxe/archive/2011/08/11/153054.htmlhttp://www.shnenglu.com/jaxe/comments/153054.htmlhttp://www.shnenglu.com/jaxe/archive/2011/08/11/153054.html#Feedback0http://www.shnenglu.com/jaxe/comments/commentRss/153054.htmlhttp://www.shnenglu.com/jaxe/services/trackbacks/153054.html
lua 鎵嬪唽鍘熸枃鏄繖鏍瘋В閲婄殑:
A weak table is a table whose elements are weak references. A weak reference is ignored by the garbage collector. In other words, if the only references to an object are weak references, then the garbage collector will collect this object.
A weak table can have weak keys, weak values, or both. A table with weak keys allows the collection of its keys, but prevents the collection of its values. A table with both weak keys and weak values allows the collection of both keys and values. In any case, if either the key or the value is collected, the whole pair is removed from the table. The weakness of a table is controlled by the __mode field of its metatable. If the __mode field is a string containing the character 'k', the keys in the table are weak. If __mode contains 'v', the values in the table are weak.
After you use a table as a metatable, you should not change the value of its __mode field. Otherwise, the weak behavior of the tables controlled by this metatable is undefined.

鍦╨ua涓?鍍弔able,userdata,function榪欎簺綾誨瀷鐨勫奸兘鏄紩鐢ㄤ紶閫?閫氳繃寮曠敤璁℃暟鏉ュ垽鏂槸鍚︽敹鎺夊璞?鑰屽急寮曠敤(weak reference)浼氳鍨冨溇鍥炴敹鍣ㄥ拷鐣?weak table灝辨槸瀹冪殑鍏冪礌鏄急寮曠敤鐨?涓涓厓绱?閿煎)鍙兘閿槸寮卞紩鐢?涔熷彲鑳藉兼槸寮卞紩鐢ㄧ殑,涔熷彲鑳介兘鏄急寮曠敤, 榪欎釜鐗規ф槸閫氳繃寮辮〃鐨刴etatable鐨刜_mode鐨勫兼潵璁劇疆鐨?鐗瑰埆鏈夋剰鎬濈殑鏄?褰撳急琛ㄤ腑涓涓敭鍊煎,瀹冪殑閿垨鍊煎叧鑱?寮曠敤/鎸囧悜)鐨勯偅涓璞¤鍨冨溇鍥炴敹鍣ㄥ洖鏀剁殑鏃跺?榪欎釜閿煎浼氫粠寮辮〃涓鑷姩鍒犻櫎鎺?榪欐槸涓緢閲嶈鐨勭壒鐐?

閭d箞寮辮〃鍒板簳鏈変粈涔堢敤鍛? 鍦╨ua鐨剋iki涓湁涓綃囦嬌鐢╱serdata鐨勪緥瀛?,鍏朵腑灝卞緢宸у鐨勭敤鍒頒簡寮辮〃,鍘熸枃鍦板潃 http://lua-users.org/wiki/CppBindingWithLunar
榪欑瘒鏂囩珷浠嬬粛浜嗗浣曢氳繃userdata緇戝畾c++瀵硅薄鍒拌剼鏈腑
fulluserdata鑳藉璁劇疆metatable,涔熷氨鑳芥ā鎷熷嚭瀵硅薄鐨勬晥鏋滃嚭鏉?瀵逛竴涓狢++鐨勭被鐨勫璞″疄渚嬫潵璇?push鍒拌剼鏈腑,涓鑸槸鍒涘緩浜嗕竴涓猽serdata,鏂囩珷涓敤寮辮〃閬垮厤浜嗗悓涓涓璞″疄渚?鎸囬拡) push鍒拌剼鏈腑,澶氭鍒涘緩userdata鐨勯棶棰?
鎹㈠彞璇濇潵璇?濡傛灉C++瀵硅薄鐨勭敓瀛樺懆鏈熸槸闈爈ua鐨勫瀮鍦懼洖鏀舵潵鎺у埗鐨勮瘽(userdata琚洖鏀舵椂,璋冪敤鍏冭〃鐨刜_gc鏂規硶,__gc鏂規硶涓瀽鏋刢++瀵硅薄),涓涓狢++瀵硅薄鍙兘鏈変竴涓敮涓鐨剈serdata. 鍦╱serdata鐨刴etatable涓垱寤轟竴涓兼槸寮卞紩鐢ㄧ殑寮辮〃,鐢–++瀵硅薄鎸囬拡鍋氶敭,姣忔push c++瀵硅薄鐨勬椂鍊?灝卞幓鐢ㄦ寚閽堝兼煡寮辮〃,濡傛灉鏈?灝眕ush閭d釜userdata,娌℃湁灝卞垱寤?  鍚屾椂,褰搖serdata鏄寮卞紩鐢ㄧ殑,褰撹鍨冨溇鍥炴敹鎺夌殑鏃跺?寮辮〃涓畠鎵鍦ㄧ殑閿煎鑷姩琚攢姣佷簡. 





嫻╂瘺 2011-08-11 14:33 鍙戣〃璇勮
]]>
久久精品国产男包| 久久久青草久久久青草| 国产福利电影一区二区三区久久久久成人精品综合 | 久久精品无码午夜福利理论片| 久久亚洲av无码精品浪潮| 青青青伊人色综合久久| 久久精品一区二区| 久久99精品国产99久久| 国产亚洲精品自在久久| 97精品伊人久久大香线蕉app| 国产成年无码久久久久毛片| 久久久精品人妻一区二区三区蜜桃 | 久久精品国产一区二区三区| 久久99精品九九九久久婷婷| 久久综合成人网| 亚洲国产小视频精品久久久三级| 国产精品乱码久久久久久软件| 中文字幕无码免费久久| 久久天天躁狠狠躁夜夜96流白浆| 奇米影视7777久久精品| 久久成人精品视频| 无码任你躁久久久久久久| 久久精品国产精品亚洲精品 | 99久久99久久精品国产片果冻| 亚洲AV乱码久久精品蜜桃| 国产精品久久久久久| 久久久久久国产a免费观看不卡| 亚洲欧洲久久av| 久久精品国产亚洲AV嫖农村妇女 | 一本大道久久香蕉成人网| 久久久噜噜噜久久熟女AA片| 久久久久久a亚洲欧洲aⅴ| 亚洲国产精品综合久久网络| 久久精品人成免费| 久久久久香蕉视频| 狠狠色噜噜狠狠狠狠狠色综合久久| 欧美大战日韩91综合一区婷婷久久青草 | 青青草原精品99久久精品66| 久久国产成人| 久久久精品午夜免费不卡| 久久久精品国产|