parent
8e650d2a3b
commit
ee97a84884
|
|
@ -49,11 +49,13 @@ type tmemoryclass=class
|
|||
{**
|
||||
@explan(说明) 获得指针字节数 %%
|
||||
**}
|
||||
{$ifdef linux}
|
||||
return 8;
|
||||
{$endif}
|
||||
{$IFDEF win64}
|
||||
return 8;
|
||||
{$ELSE}
|
||||
return 4;
|
||||
{$ENDIF}
|
||||
return 4;
|
||||
end
|
||||
function opblocks(p,f,v); //内存存储操作
|
||||
begin
|
||||
|
|
@ -141,13 +143,12 @@ type tmemoryclass=class
|
|||
@explan(说明)获取底层操作工具 %%
|
||||
@return (t_mem_mgr)内存底层管理工具
|
||||
**}
|
||||
if not ifobj(_tool)then _tool := get_mem_mgr();
|
||||
return _tool;
|
||||
return get_mem_mgr();
|
||||
end
|
||||
function create();
|
||||
begin
|
||||
_blocks := array();
|
||||
mtool();
|
||||
_tool := mtool();
|
||||
end
|
||||
function destroy();virtual;
|
||||
begin
|
||||
|
|
@ -161,14 +162,14 @@ type tmemoryclass=class
|
|||
end
|
||||
_blocks := array();
|
||||
end
|
||||
protected
|
||||
static _tool;
|
||||
private
|
||||
_tool;
|
||||
_blocks; //分配的内存块;以地址为索引的数组,值为分配的大小;
|
||||
end
|
||||
//内存管理类,不支持**类型
|
||||
type ctslctrans = class(tmemoryclass)
|
||||
private
|
||||
_tool;
|
||||
Fstrcdata;
|
||||
_nomalloc;
|
||||
_ptr;//对象地址
|
||||
|
|
@ -440,6 +441,7 @@ type ctslctrans = class(tmemoryclass)
|
|||
@param(ifset)(integer) 递归构造时使用%%
|
||||
**}
|
||||
class(tmemoryclass).create();
|
||||
_tool := mtool();
|
||||
_ptr := 0;
|
||||
if not(ifarray(data)and mcols(data)>3)then
|
||||
begin
|
||||
|
|
|
|||
Loading…
Reference in New Issue