Ignore:
Timestamp:
Nov 5, 2015, 4:41:37 PM (4 years ago)
Author:
nmedfort
Message:

Back up check in. Memory leaks should be fixed.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/pablo/function.cpp

    r4726 r4860  
    1616PabloFunction::PabloFunction(std::string && name, const unsigned numOfParameters, const unsigned numOfResults)
    1717: Prototype(ClassTypeId::Function, std::move(name), numOfParameters, numOfResults, nullptr)
     18, mSymbolTable(new SymbolGenerator())
    1819, mEntryBlock(PabloBlock::Create(mSymbolTable))
    1920, mParameters(reinterpret_cast<Var **>(mAllocator.allocate(sizeof(Var *) * numOfParameters)))
     
    3738}
    3839
     40void PabloFunction::operator delete(void * ptr) {
     41    PabloFunction * f = static_cast<PabloFunction *>(ptr);
     42    delete f->mSymbolTable;
     43    f->mSymbolTable = nullptr;
    3944}
     45
     46}
Note: See TracChangeset for help on using the changeset viewer.