[coco] Deallocate Op in OpManager properly (#2500)
author박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 <jh1302.park@samsung.com>
Thu, 6 Dec 2018 00:23:02 +0000 (09:23 +0900)
committerGitHub Enterprise <noreply-CODE@samsung.com>
Thu, 6 Dec 2018 00:23:02 +0000 (09:23 +0900)
commitf6082af255a4aacdf80c302dd77e2a1d47ce253f
tree9c6601668d57c2b5cb2b92faa48ca1c6a31237fd
parent6441123fd0fd0103a45b8eef803af08357de1131
[coco] Deallocate Op in OpManager properly (#2500)

The current implementation of OpManager just deallocates all the Op in
sequential order without considering their dependencies.

However, this implementation may result in USE-AFTER-FREE errors.

This commit guarantees that OpManager deallocates Op nodes from the root
to leaves.

Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
contrib/coco/core/include/coco/IR/OpManager.h
contrib/coco/core/src/IR/OpManager.cpp