Kaynağa Gözat

refactor: 限制ByteCode只能建立在堆上

SongZihuan 3 yıl önce
ebeveyn
işleme
45197614f9
1 değiştirilmiş dosya ile 2 ekleme ve 1 silme
  1. 2 1
      include/core/code.h

+ 2 - 1
include/core/code.h

@@ -45,7 +45,6 @@ namespace aFuncore {
         explicit ByteCode(Code &belong, aFuntool::FileLine line);
         ByteCode(Code &belong, const std::string &element, aFuntool::FileLine line, char prefix=aFuntool::NUL);
         ByteCode(Code &belong, BlockType block_type, ByteCode *son, aFuntool::FileLine line, char prefix=aFuntool::NUL);
-        ~ByteCode();
         ByteCode &operator=(const ByteCode &)=delete;
 
         ByteCode *connect(ByteCode *new_code);
@@ -86,6 +85,8 @@ namespace aFuncore {
 
         Code &belong;
         aFuntool::FileLine line;
+
+        ~ByteCode();  // 限制 ByteCode 只能建立在堆上
     };
 }