Skip to content

Commit e61503c

Browse files
committed
Use "destroy" instead of "delete".
1 parent 8641bfa commit e61503c

8 files changed

Lines changed: 11 additions & 11 deletions

File tree

engine/source/dmdscript/darray.d

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -753,8 +753,8 @@ void *Darray_prototype_sort(Dobject pthis, CallContext *cc, Dobject othis, Value
753753
}
754754
}
755755

756-
delete p1;
757-
delete p2;
756+
destroy(p1);
757+
destroy(p2);
758758

759759
ret.putVobject(othis);
760760
return null;

engine/source/dmdscript/ddeclaredfunction.d

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ class DdeclaredFunction : Dfunction
148148

149149
result = IR.call(cc, othis, fd.code, ret, locals.ptr);
150150

151-
delete p1;
151+
destroy(p1);
152152

153153
cc.callerf = callerfsave;
154154
cc.caller = callersave;

engine/source/dmdscript/dfunction.d

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ void* Dfunction_prototype_apply(Dobject pthis, CallContext *cc, Dobject othis, V
224224

225225
v = othis.Call(cc, o, ret, alist);
226226

227-
delete p1;
227+
destroy(p1);
228228
}
229229
return v;
230230
}

engine/source/dmdscript/dglobal.d

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ void* Dglobal_eval(Dobject pthis, CallContext *cc, Dobject othis, Value* ret, Va
155155
assert(cc.callerothis);
156156
result = IR.call(cc, cc.callerothis, fd.code, ret, locals.ptr);
157157
if(p1)
158-
delete p1;
158+
destroy(p1);
159159
fd = null;
160160
// if (result) writef("result = '%s'\n", (cast(Value* )result).toString());
161161
return result;

engine/source/dmdscript/irstate.d

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,7 @@ struct IRstate
485485
}
486486
}
487487

488-
delete p1;
488+
destroy(p1);
489489

490490
//return;
491491
// Remove all IRnop's

engine/source/dmdscript/iterator.d

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ struct Iterator
8484
{
8585
while(keyindex == keys.length)
8686
{
87-
delete keys;
87+
destroy(keys);
8888
o = getPrototype(o);
8989
if(!o)
9090
return null;

engine/source/dmdscript/parse.d

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ class Parser : Lexer
9898
if(p.errinfo.message)
9999
goto Lreturn;
100100

101-
delete p;
101+
destroy(p);
102102

103103
// Parse StatementList
104104
p = new Parser("anonymous", bdy, 0);
@@ -119,7 +119,7 @@ class Parser : Lexer
119119
pfd = fd;
120120
perrinfo = p.errinfo;
121121
result = (p.errinfo.message != null);
122-
delete p;
122+
destroy(p);
123123
p = null;
124124
return result;
125125
}

engine/source/dmdscript/program.d

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,13 +227,13 @@ class Program
227227

228228
result.getErrInfo(cc, &errinfo, cc.linnum);
229229
cc.linnum = 0;
230-
delete p1;
230+
destroy(p1);
231231
throw new ScriptException(&errinfo);
232232
}
233233
//writef("-Program.execute()\n");
234234

235235

236-
delete p1;
236+
destroy(p1);
237237
}
238238

239239
void toBuffer(ref tchar[] buf)

0 commit comments

Comments
 (0)