锘??xml version="1.0" encoding="utf-8" standalone="yes"?>老司机午夜网站国内精品久久久久久久久,久久国产精品久久精品国产,久久精品99久久香蕉国产色戒 http://m.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://m.shnenglu.com/jaxe/archive/2011/08/11/153054.html嫻╂瘺嫻╂瘺Thu, 11 Aug 2011 06:33:00 GMThttp://m.shnenglu.com/jaxe/archive/2011/08/11/153054.htmlhttp://m.shnenglu.com/jaxe/comments/153054.htmlhttp://m.shnenglu.com/jaxe/archive/2011/08/11/153054.html#Feedback0http://m.shnenglu.com/jaxe/comments/commentRss/153054.htmlhttp://m.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灝辨槸瀹冪殑鍏冪礌鏄急寮曠敤鐨?涓涓厓绱?閿煎)鍙兘閿槸寮卞紩鐢?涔熷彲鑳藉兼槸寮卞紩鐢ㄧ殑,涔熷彲鑳介兘鏄急寮曠敤, 榪欎釜鐗規(guī)ф槸閫氳繃寮辮〃鐨刴etatable鐨刜_mode鐨勫兼潵璁劇疆鐨?鐗瑰埆鏈夋剰鎬濈殑鏄?褰撳急琛ㄤ腑涓涓敭鍊煎,瀹冪殑閿垨鍊煎叧鑱?寮曠敤/鎸囧悜)鐨勯偅涓璞¤鍨冨溇鍥炴敹鍣ㄥ洖鏀剁殑鏃跺?榪欎釜閿煎浼氫粠寮辮〃涓鑷姩鍒犻櫎鎺?榪欐槸涓緢閲嶈鐨勭壒鐐?

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





嫻╂瘺 2011-08-11 14:33 鍙戣〃璇勮
]]>
亚洲AV日韩AV永久无码久久| 99久久成人18免费网站| 漂亮人妻被中出中文字幕久久 | 国产精品久久久久…| 国产午夜福利精品久久| 久久成人18免费网站| 久久久久99精品成人片欧美| 久久久久久久99精品免费观看| 无码人妻少妇久久中文字幕 | 色婷婷综合久久久久中文一区二区| 99久久人妻无码精品系列| 国产真实乱对白精彩久久| 一本色道久久综合狠狠躁| 99久久精品无码一区二区毛片| 99久久香蕉国产线看观香| 久久99精品国产麻豆宅宅| 久久精品国产亚洲αv忘忧草| 国产成人无码精品久久久久免费| 国产精品久久久久a影院| 久久精品嫩草影院| 奇米综合四色77777久久| 日韩AV毛片精品久久久| 国产精品狼人久久久久影院| 久久99亚洲网美利坚合众国| 影音先锋女人AV鲁色资源网久久| 久久精品国产亚洲av瑜伽| 欧美日韩中文字幕久久伊人| 少妇久久久久久被弄高潮| 精品国产乱码久久久久软件| 久久久无码精品亚洲日韩软件| 久久精品国产91久久麻豆自制| 久久婷婷五月综合色高清| 无码人妻久久一区二区三区免费丨 | 久久亚洲精品成人AV| 久久伊人五月丁香狠狠色| 伊人久久无码精品中文字幕| 伊人久久大香线蕉综合网站| 色婷婷噜噜久久国产精品12p| 久久精品国产一区二区三区不卡| 国产巨作麻豆欧美亚洲综合久久| 岛国搬运www久久|