[Compiler Error] Could not Make a FBufferArchive into a UPROPERTY()

Dear Friends at Epic,

This will not compile, says cannot find type FBufferArchive

//~~~ Victory File Writer ~~~
USTRUCT()
struct FVictoryFileWriter
{
	GENERATED_USTRUCT_BODY()

        UPROPERTY()
	FBufferArchive* File;

       FVictoryFileWriter(){}
};

This DOES compile

//~~~ Victory File Writer ~~~
USTRUCT()
struct FVictoryFileWriter
{
	GENERATED_USTRUCT_BODY()

	FBufferArchive* File;

       FVictoryFileWriter(){}
};

#Summary

Can you make it so that BufferArchives can be a UPROPERTY() ?

#Further Analysis

Yes I know the nature of BufferArchives is that that they should not be kept around a long time anyways.

But to have an archive garbage collected prematurely would just be not-Rainbow (!Rainbow)


#Thanks!

thanks!

Rama

PS: I’ve had stuff get garbage collected prematurely in the past, it was very !Rainbow to try and debug that, and UPROPERTY() is my best protection

Only UObjects are GC’d, so you don’t need to worry about making the FBufferArchive* a UPROPERTY. You are responsible for managing that memory yourself.

Thanks for the info James!

I have been saving and loading custom binary file types for my in-game editor for months now thanks to your lovely assistance!

#:heart:

Rama