fix memory crash bug by freeing m_scopeNetworkOperationMode before
EvalBase:Destroy(), since m_scopeNetworkOperationMode requires a reference to the network.
This commit is contained in:
Родитель
9bad39ecc3
Коммит
80040aefd3
|
@ -438,6 +438,8 @@ void CNTKEvalExtended<ElemType>::ForwardPass(const ValueRefs<ElemType>& inputs,
|
|||
template <typename ElemType>
|
||||
void CNTKEvalExtended<ElemType>::Destroy()
|
||||
{
|
||||
// Since m_scopeNetworkOperationMode has a reference to m_net, it has to be released first.
|
||||
m_scopedNetworkOperationMode.reset();
|
||||
CNTKEvalBase<ElemType>::Destroy();
|
||||
delete this;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче