Files
UnrealEngineUWP/Engine/Source/Runtime/RenderCore/Public/RenderDeferredCleanup.h
henrik karlsson 8f20bd5cee [RenderCore]
* Moved dllexport from types to methods/staticvars

#rb none (approved by cwaters)

[CL 25902670 by henrik karlsson in ue5-main branch]
2023-06-09 16:04:27 -04:00

39 lines
1.1 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "Containers/Array.h"
/**
* The base class of objects that need to defer deletion until the render command queue has been flushed.
*/
class FDeferredCleanupInterface
{
public:
virtual ~FDeferredCleanupInterface() {}
};
/**
* A set of cleanup objects which are pending deletion.
*/
class FPendingCleanupObjects
{
TArray<FDeferredCleanupInterface*> CleanupArray;
public:
inline bool IsEmpty() const { return CleanupArray.IsEmpty(); }
FPendingCleanupObjects();
RENDERCORE_API ~FPendingCleanupObjects();
};
/**
* Adds the specified deferred cleanup object to the current set of pending cleanup objects.
*/
extern RENDERCORE_API void BeginCleanup(FDeferredCleanupInterface* CleanupObject);
/**
* Transfers ownership of the current set of pending cleanup objects to the caller. A new set is created for subsequent BeginCleanup calls.
* @return A pointer to the set of pending cleanup objects. The called is responsible for deletion.
*/
extern RENDERCORE_API FPendingCleanupObjects* GetPendingCleanupObjects();