/////////////////////////////////////////////////////////////////////// public void Free( bool global ) { // // HACK: *SPECIAL CASE* We cannot dispose the global call frame // unless we are [also] disposing of the interpreter itself. // if (global || !FlagOps.HasFlags(flags, CallFrameFlags.NoFree, true)) { kind = IdentifierKind.None; id = Guid.Empty; name = null; group = null; description = null; clientData = null; frameId = 0; frameLevel = 0; flags = CallFrameFlags.None; /////////////////////////////////////////////////////////////// if (tags != null) { tags.Clear(); tags = null; } /////////////////////////////////////////////////////////////// index = 0; level = 0; /////////////////////////////////////////////////////////////// if (arguments != null) { // // BUGFIX: We can only mutate argument lists that we own. // if (ownArguments) { arguments.Clear(); } arguments = null; } /////////////////////////////////////////////////////////////// ownArguments = false; /////////////////////////////////////////////////////////////// if (procedureArguments != null) { procedureArguments.Clear(); procedureArguments = null; } /////////////////////////////////////////////////////////////// if (variables != null) { variables.Clear(); variables = null; } /////////////////////////////////////////////////////////////// other = null; /* NOTE: Not owned, do not dispose. */ previous = null; /* NOTE: Not owned, do not dispose. */ next = null; /* NOTE: Not owned, do not dispose. */ /////////////////////////////////////////////////////////////// engineData = null; /* NOTE: Not owned, do not dispose. */ auxiliaryData = null; /* NOTE: Not owned, do not dispose. */ resolveData = null; /* NOTE: Not owned, do not dispose. */ extraData = null; /* NOTE: Not owned, do not dispose. */ } }