MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / Cleanup

Method Cleanup

tensorflow/core/framework/variant.h:427–442  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

425 }
426
427 void Cleanup() {
428 // **NOTE** This must be a no-op if the memory representation of
429 // InlineValue is all zeros, in order to properly interact with
430 // HeapOrInline::ResetMemory().
431 if (has_value) {
432 // This doesn't actually delete anything on the heap; the delete
433 // operator of Value<VT> is overridden to do nothing for inline
434 // values; the side-effect of delete is that the virtual destructor is
435 // called.
436 //
437 // We leave it to callers to overwrite the data buffer in value_data
438 // with new objects.
439 delete AsValueInterface();
440 }
441 has_value = false;
442 }
443
444 InlineValue& operator=(const InlineValue& other) {
445 if (&other == this) return *this;

Callers 2

InlineValueMethod · 0.45
InlineValueClass · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected