⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tst610.mal

📁 一个内存数据库的源代码这是服务器端还有客户端
💻 MAL
字号:
#this test is used to monitor reference count setting#create a persistent bat and destroy it in test 612function refs():void;    g:=bbp.getNames();    gr:=bbp.getRefCount();    gl:=bbp.getLRefCount();    io.print(g,gr,gl);end refs;b:= bat.new(:int,:int);#refs();bat.insert(b,23,32);#refs();bat.setName(b,"tasks");#refs();bat.setPersistent(b,true);#refs();# it is committed io.print("open box");bbp.open();user.refs();t:bat[:any_1,:any_2]:= bbp.bind("tasks");io.print(t);bbp.release(t);user.refs();io.print(t);catch MALException:str;io.print("BAT was released");exit MALException;# the bat is still visible, because the destroy only# marks it for deletion at the end of session or# when the reference counters drop to zerot:bat[:any_1,:any_2]:= bbp.bind("tasks");user.refs();# to really remove, we get rid of the current# references as wellbbp.destroy(t,true);user.refs();io.print(t);catch MALException:str;io.print("BAT was destroyed");exit MALException;z:bat[:any_1,:any_2]:= bbp.bind("tasks");io.print(z);#it is not in the box anymore eithercatch MALException:str;io.print("BAT was removed from the box");exit MALException;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -