From 56b6e634b54d5e44160fd66f7377afadf943833a Mon Sep 17 00:00:00 2001 From: =?utf8?q?=EB=B0=95=EC=A2=85=ED=98=84/=EB=8F=99=EC=9E=91=EC=A0=9C?= =?utf8?q?=EC=96=B4Lab=28SR=29/Staff=20Engineer/=EC=82=BC=EC=84=B1?= =?utf8?q?=EC=A0=84=EC=9E=90?= Date: Thu, 6 Sep 2018 09:08:58 +0900 Subject: [PATCH] [coco] Introduce Op dispose (#1364) This commit introduces Op::dispose method which allows users to request each operation to release resources before destruction. Signed-off-by: Jonghyun Park --- contrib/coco/core/include/coco/IR/Op.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/contrib/coco/core/include/coco/IR/Op.h b/contrib/coco/core/include/coco/IR/Op.h index 5629699..5130ef7 100644 --- a/contrib/coco/core/include/coco/IR/Op.h +++ b/contrib/coco/core/include/coco/IR/Op.h @@ -76,6 +76,13 @@ protected: public: Instr *parent(void) const; + +public: + // @brief Release all the references + // + // NOTE The state after dispose SHOULD be identical to that just after construction + // TODO Rewrite as a pure virtual method once all the existing Op implement this method + virtual void dispose(void) { return; } }; } // namespace coco -- 2.7.4