free moved tasks and executed tasks (#3578)

Signed-off-by: Wang Xiangyu <xy.wang@zilliz.com>
pull/3584/head
Wang Xiangyu 2020-09-03 17:56:22 +08:00
parent 26cf6c408a
commit 7821ead86b
1 changed files with 2 additions and 2 deletions

View File

@ -174,7 +174,7 @@ Resource::loader_function() {
task_item->Loaded();
if (task_item->from) {
task_item->from->Moved();
// task_item->from->task = FinishedTask::Create();
task_item->from->task = FinishedTask::Create(task_item->from->task);
task_item->from = nullptr;
}
if (subscriber_) {
@ -204,7 +204,7 @@ Resource::executor_function() {
}
auto start = get_current_timestamp();
Process(task_item->task);
// task_item->task = FinishedTask::Create();
task_item->task = FinishedTask::Create(task_item->task);
auto finish = get_current_timestamp();
++total_task_;
total_cost_ += finish - start;