mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-18 11:19:10 +00:00
Get rid of DEL() and FREE() macros.
Part of CoreLibExe must die.
This commit is contained in:
@ -102,7 +102,7 @@ void CNtWaitHandle::IncRef () {
|
||||
//===========================================================================
|
||||
void CNtWaitHandle::DecRef () {
|
||||
if (!InterlockedDecrement(&m_refCount))
|
||||
DEL(this);
|
||||
delete this;
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
|
@ -384,7 +384,7 @@ void INtFileDelete (
|
||||
}
|
||||
file->critsect.Leave();
|
||||
|
||||
DEL(file);
|
||||
delete file;
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
|
@ -600,7 +600,7 @@ static void ListenPrepareListeners (fd_set * readfds) {
|
||||
|
||||
// destroy unused ports
|
||||
if (!port->listenCount) {
|
||||
DEL(port);
|
||||
delete port;
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -980,7 +980,7 @@ void INtSocketOpCompleteSocketConnect (NtOpConnAttempt * op) {
|
||||
// and because connection attempts are not waitable
|
||||
ASSERT(!op->link.IsLinked());
|
||||
ASSERT(!op->signalComplete);
|
||||
DEL(op);
|
||||
delete op;
|
||||
|
||||
PerfSubCounter(kAsyncPerfSocketConnAttemptsOutCurr, 1);
|
||||
}
|
||||
@ -1259,7 +1259,7 @@ void NtSocketDelete (AsyncSocket conn) {
|
||||
return;
|
||||
}
|
||||
|
||||
DEL(sock);
|
||||
delete sock;
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
|
@ -190,7 +190,7 @@ void CFile::Complete (void * op, CCritSect * critSect, AsyncId asyncId) {
|
||||
//===========================================================================
|
||||
void CFile::Delete (void * op) {
|
||||
FileOp * fileOp = (FileOp *)op;
|
||||
DEL(fileOp);
|
||||
delete fileOp;
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
|
@ -457,13 +457,13 @@ void CSocket::OnConnect () {
|
||||
);
|
||||
|
||||
// Delete the connect command
|
||||
DEL(command);
|
||||
delete command;
|
||||
|
||||
// Handle failure to connect
|
||||
if (error) {
|
||||
|
||||
// Destroy the socket
|
||||
DEL(this);
|
||||
delete this;
|
||||
|
||||
}
|
||||
|
||||
@ -643,7 +643,7 @@ void CSocket::ProcessQueue () {
|
||||
}
|
||||
|
||||
// Delete the command
|
||||
DEL(command);
|
||||
delete command;
|
||||
|
||||
}
|
||||
|
||||
@ -1105,7 +1105,7 @@ void W9xSocketDelete (
|
||||
|
||||
// Delete the object
|
||||
s_critSect.Enter();
|
||||
DEL(object);
|
||||
delete object;
|
||||
s_critSect.Leave();
|
||||
|
||||
}
|
||||
|
@ -234,7 +234,7 @@ static unsigned CALLBACK W9xThreadProc (AsyncThread *) {
|
||||
if (rec) {
|
||||
s_dispInProcList.Link(rec);
|
||||
rec->Complete(&s_critSect);
|
||||
DEL(rec);
|
||||
delete rec;
|
||||
timeout = 0;
|
||||
}
|
||||
else {
|
||||
|
@ -132,7 +132,7 @@ static void LookupProcess (Lookup * lookup, unsigned error) {
|
||||
// section because it isn't linked into an ioConn opList
|
||||
// and because connection attempts are not waitable
|
||||
ASSERT(!lookup->link.IsLinked());
|
||||
DEL(lookup);
|
||||
delete lookup;
|
||||
PerfSubCounter(kAsyncPerfNameLookupAttemptsCurr, 1);
|
||||
}
|
||||
|
||||
|
@ -148,7 +148,7 @@ static unsigned THREADCALL ThreadTaskProc (AsyncThread * thread) {
|
||||
#endif
|
||||
|
||||
task->taskList->DecRef("task");
|
||||
DEL(task);
|
||||
delete task;
|
||||
}
|
||||
}
|
||||
PerfSubCounter(kAsyncPerfThreadTaskThreadsActive, 1);
|
||||
|
@ -553,7 +553,7 @@ void AsyncSocketUnregisterNotifyProc (
|
||||
s_notifyProcLock.LeaveWrite();
|
||||
|
||||
// perform memory deallocation outside the lock
|
||||
DEL(scan);
|
||||
delete scan;
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
|
@ -145,7 +145,7 @@ static void LogFileNotifyProc (
|
||||
) {
|
||||
switch (code) {
|
||||
case kNotifyFileWrite:
|
||||
FREE(notify->param);
|
||||
free(notify->param);
|
||||
AtomicAdd(&s_opsPending, -1);
|
||||
break;
|
||||
|
||||
@ -171,7 +171,7 @@ static void AllocLogBuffer_CS (unsigned index) {
|
||||
//============================================================================
|
||||
static void FreeLogBuffer_CS (unsigned index) {
|
||||
if (s_logBuf[index]) {
|
||||
FREE(s_logBuf[index]);
|
||||
free(s_logBuf[index]);
|
||||
s_logBuf[index] = nil;
|
||||
}
|
||||
}
|
||||
@ -279,7 +279,7 @@ static void WriteLogFile_CS (unsigned index, bool close) {
|
||||
s_logBuf[index]
|
||||
);
|
||||
if (flags == kAsyncFileRwSync)
|
||||
DEL(s_logBuf[index]);
|
||||
delete s_logBuf[index];
|
||||
else
|
||||
AtomicAdd(&s_opsPending, 1);
|
||||
s_logWritePos[index] += s_logPos[index];
|
||||
|
@ -75,7 +75,7 @@ static unsigned CALLBACK CreateThreadProc (LPVOID param) {
|
||||
unsigned result = thread->proc(thread);
|
||||
|
||||
// Cleanup thread
|
||||
DEL(thread);
|
||||
delete thread;
|
||||
|
||||
PerfSubCounter(kAsyncPerfThreadsCurr, 1);
|
||||
return result;
|
||||
|
@ -133,7 +133,7 @@ static inline unsigned RunTimers () {
|
||||
while (AsyncTimer * t = s_timerDelete.Head()) {
|
||||
if (t->destroyProc)
|
||||
CallTimerProc(t, t->destroyProc);
|
||||
DEL(t);
|
||||
delete t;
|
||||
}
|
||||
|
||||
// Get first timer to run
|
||||
@ -225,7 +225,7 @@ void TimerDestroy (unsigned exitThreadWaitMs) {
|
||||
while (AsyncTimer * t = s_timerDelete.Head()) {
|
||||
if (t->destroyProc)
|
||||
CallTimerProc(t, t->destroyProc);
|
||||
DEL(t);
|
||||
delete t;
|
||||
}
|
||||
s_timerCrit.Leave();
|
||||
|
||||
|
Reference in New Issue
Block a user