m_threads.push_back(thread);
}
+ result = ::vm_deallocate(mach_task_self(), reinterpret_cast<vm_address_t>(threadList), threadCount * sizeof(thread_act_t));
+ if (result != KERN_SUCCESS)
+ {
+ TRACE("vm_deallocate FAILED %x %s\n", result, mach_error_string(result));
+ }
+
return true;
}
{
CHECK_MACH("thread_get_register_pointer_values()", machret);
}
+
+ machret = mach_port_deallocate(mach_task_self(), pThreads[i]);
+ CHECK_MACH("mach_port_deallocate()", machret);
}
// Deallocate the thread list now we're done with it.
machret = vm_deallocate(mach_task_self(), (vm_address_t)pThreads, cThreads * sizeof(thread_act_t));
CHECK_MACH("mach_port_mod_refs()", machret);
// Deallocate the thread list now we're done with it.
+ for (mach_msg_type_number_t j = 0; j < cThreads; j++)
+ {
+ machret = mach_port_deallocate(mach_task_self(), pThreads[j]);
+ CHECK_MACH("mach_port_deallocate()", machret);
+ }
machret = vm_deallocate(mach_task_self(), (vm_address_t)pThreads, cThreads * sizeof(thread_act_t));
CHECK_MACH("vm_deallocate()", machret);
{
CHECK_MACH("thread_get_register_pointer_values()", machret);
}
+
+ machret = mach_port_deallocate(mach_task_self(), pThreads[i]);
+ CHECK_MACH("mach_port_deallocate()", machret);
}
// Deallocate the thread list now we're done with it.
machret = vm_deallocate(mach_task_self(), (vm_address_t)pThreads, cThreads * sizeof(thread_act_t));