RecyclerVisitedObject.h 1.2 KB

12345678910111213141516171819202122232425262728293031
  1. //-------------------------------------------------------------------------------------------------------
  2. // Copyright (C) Microsoft. All rights reserved.
  3. // Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
  4. //-------------------------------------------------------------------------------------------------------
  5. #pragma once
  6. interface IRecyclerHeapMarkingContext;
  7. typedef void* RecyclerHeapHandle;
  8. interface IRecyclerVisitedObject
  9. {
  10. // Called right after finish marking and this object is determined to be dead.
  11. // Should contain only simple clean up code.
  12. // Can't run another script
  13. // Can't cause a re-entrant collection
  14. virtual void Finalize(bool isShutdown) = 0;
  15. // Call after sweeping is done.
  16. // Can call other script or cause another collection.
  17. virtual void Dispose(bool isShutdown) = 0;
  18. // Used only by TrackableObjects (created with TrackedBit on by RecyclerNew*Tracked)
  19. virtual void Mark(RecyclerHeapHandle recycler) = 0;
  20. // Special behavior on certain GC's
  21. virtual void OnMark() = 0;
  22. // Used only by RecyclerVisitedHost objects (created with RecyclerAllocVistedHost_Traced*)
  23. virtual void Trace(IRecyclerHeapMarkingContext* markingContext) = 0;
  24. };