public Object getRawOldValueAsHeapObject() {
    Object result = basicGetOldValue();
    if (mayHaveOffHeapReferences()) {
      result = OffHeapHelper.copyIfNeeded(result, getRegion().getCache());
    }
    return result;
  }
Like getRawOldValue except that if the result is an off-heap reference then copy it to the
heap. To avoid the heap copy use getRawOldValue instead.
geode-core/src/main/java/org/apache/geode/internal/cache/EntryEventImpl.java