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

**URL:** <https://forums.unrealengine.com/t/compiler-error-could-not-make-a-fbufferarchive-into-a-uproperty/275584>\
**Category:** C++\
**Tags:** unreal-engine, bug-report, CPP, question\
**Created:** [March 11, 2014, 2:30am UTC](https://forums.unrealengine.com/t/compiler-error-could-not-make-a-fbufferarchive-into-a-uproperty/275584 "2014-03-11T02:30:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ue4-archive](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ue4-archive](https://forums.unrealengine.com/u/ue4-archive)\
**Post date:** [March 11, 2014, 2:30am UTC](https://forums.unrealengine.com/t/compiler-error-could-not-make-a-fbufferarchive-into-a-uproperty/275584/1 "2014-03-11T02:30:29Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![ue4-archive](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ue4-archive](https://forums.unrealengine.com/u/ue4-archive)\
**Post date:** [March 11, 2014, 2:30am UTC](https://forums.unrealengine.com/t/compiler-error-could-not-make-a-fbufferarchive-into-a-uproperty/275584/2 "2014-03-11T02:30:29Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![ue4-archive](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ue4-archive](https://forums.unrealengine.com/u/ue4-archive)\
**Post date:** [March 11, 2014, 2:30am UTC](https://forums.unrealengine.com/t/compiler-error-could-not-make-a-fbufferarchive-into-a-uproperty/275584/3 "2014-03-11T02:30:30Z")

</div>

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!

#❤

Rama
