MCPcopy Create free account
hub / github.com/beefytech/Beef / ReleaseContext

Method ReleaseContext

IDEHelper/Compiler/CeMachine.cpp:10715–10737  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10713}
10714
10715void CeMachine::ReleaseContext(CeContext* ceContext)
10716{
10717 ceContext->mStringMap.Clear();
10718 delete ceContext->mTypeDeclState;
10719 ceContext->mTypeDeclState = NULL;
10720 ceContext->mReflectMap.Clear();
10721 ceContext->mConstDataMap.Clear();
10722 ceContext->mMemory.Clear();
10723 if (ceContext->mMemory.mAllocSize > BF_CE_MAX_CARRYOVER_MEMORY)
10724 ceContext->mMemory.Dispose();
10725 ceContext->mStaticCtorExecSet.Clear();
10726 ceContext->mStaticFieldMap.Clear();
10727 ceContext->mStaticFieldIdMap.Clear();
10728 ceContext->mHeap->Clear(BF_CE_MAX_CARRYOVER_HEAP);
10729 ceContext->mReflectTypeIdOffset = -1;
10730 mCurEmitContext = ceContext->mCurEmitContext;
10731 ceContext->mCurEmitContext = NULL;
10732 mContextList.Add(ceContext);
10733 for (auto kv : ceContext->mInternalDataMap)
10734 kv.mValue->Release();
10735 ceContext->mInternalDataMap.Clear();
10736 ceContext->mWorkingDir.Clear();
10737}
10738
10739BfTypedValue CeMachine::Call(CeCallSource callSource, BfModule* module, BfMethodInstance* methodInstance, const BfSizedArray<BfIRValue>& args, CeEvalFlags flags, BfType* expectingType)
10740{

Callers 3

HandleCEAttributesMethod · 0.80
DoCEEmitMethod · 0.80
GetCustomAttributeMethod · 0.80

Calls 4

ClearMethod · 0.45
DisposeMethod · 0.45
AddMethod · 0.45
ReleaseMethod · 0.45

Tested by

no test coverage detected