锘??xml version="1.0" encoding="utf-8" standalone="yes"?>老司机午夜网站国内精品久久久久久久久,久久国产精品久久精品国产,久久精品99久久香蕉国产色戒 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灝辨槸瀹冪殑鍏冪礌鏄急寮曠敤鐨?涓涓厓绱?閿煎)鍙兘閿槸寮卞紩鐢?涔熷彲鑳藉兼槸寮卞紩鐢ㄧ殑,涔熷彲鑳介兘鏄急寮曠敤, 榪欎釜鐗規(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 鍙戣〃璇勮
]]>
精品无码人妻久久久久久| 国产精品99久久久久久宅男小说| 波多野结衣久久精品| 一本一道久久a久久精品综合| 久久99九九国产免费看小说| 久久精品国产精品亚洲精品| 99国产欧美久久久精品蜜芽| 精品久久久久久国产牛牛app | 婷婷久久久亚洲欧洲日产国码AV| 亚洲国产精品无码久久SM| 久久福利青草精品资源站| 欧美日韩中文字幕久久久不卡| 亚洲午夜久久久久久噜噜噜| 999久久久免费国产精品播放| 97精品伊人久久久大香线蕉| 亚洲国产精品热久久| 久久无码人妻一区二区三区| 精品久久久久久无码人妻蜜桃| 久久精品人人做人人爽97| 成人综合久久精品色婷婷| 久久久网中文字幕| 91久久婷婷国产综合精品青草| 波多野结衣久久一区二区| 国产精品va久久久久久久| 久久99国产综合精品| 国产成人精品综合久久久久| 久久久久久国产精品免费免费| 久久国产精品-久久精品| 亚洲精品乱码久久久久久| 一本久久免费视频| 久久久久亚洲AV成人网人人软件| 97精品久久天干天天天按摩 | 国产成人久久AV免费| 99久久精品免费看国产一区二区三区| 久久午夜无码鲁丝片午夜精品| 久久成人精品视频| 久久99国产亚洲高清观看首页| 三上悠亚久久精品| 无码国内精品久久人妻蜜桃 | 久久久久国产一级毛片高清版| 久久国产精品一国产精品金尊|