# FStreamableHandle in struct requirements

**URL:** <https://forums.unrealengine.com/t/fstreamablehandle-in-struct-requirements/1301012>\
**Category:** Programming & Scripting\
**Tags:** async, unreal-engine, CPP, question\
**Created:** [September 18, 2023, 1:42am UTC](https://forums.unrealengine.com/t/fstreamablehandle-in-struct-requirements/1301012 "2023-09-18T01:42:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![gardian206](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@gardian206](https://forums.unrealengine.com/u/gardian206)\
**Post date:** [September 18, 2023, 1:42am UTC](https://forums.unrealengine.com/t/fstreamablehandle-in-struct-requirements/1301012/1 "2023-09-18T01:42:58Z")

</div>

I am attempting to put a `FStreamableHandle` into a struct so that I can easily access them, and do comparisons through like an array.

when I try to put the `FStreamableHandle` into the struct I get told I must now declare `operator=(const FMyStruct&)` and `FMyStruct(void)` constructor, but attempting to declare a constructor tells me the constructor has already been declared.

how am I supposed to hold multiple of these handles if I can’t put them into a struct?

my plan was to hold the StreamableHandle along with a “uniqueID” and the objects that hold the requester of the asset that way I can do secondary checks for if I can release the asset, and if I need to even try to load it again.

```auto
//the struct is currently
USTRUCT()
struct FMyStruct
{
	GENERATED_USTRUCT_BODY();
public:
	FStreamableHandle Handle;
	int32 itemID = 0;
	TArray<UMyActorComp*> Requesters;
};

```

---

<div class="post-metadata">

**Author:** ![gardian206](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@gardian206](https://forums.unrealengine.com/u/gardian206)\
**Post date:** [September 19, 2023, 11:43pm UTC](https://forums.unrealengine.com/t/fstreamablehandle-in-struct-requirements/1301012/2 "2023-09-19T23:43:02Z")

</div>

apparently `FStreamableHandle` is one of the few structs that must be stored as a pointer rather then a reference, which is inconsistent with most other `structs` in the engine,  
in this case giving it a smart pointer wrapper fixed the issue.

---

<div class="post-metadata">

**Author:** ![system](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/1/3/713c9d3f58553f0de89543d76a8a3a2779dc9fa4.png) [@system](https://forums.unrealengine.com/u/system)\
**Post date:** [October 19, 2023, 11:43pm UTC](https://forums.unrealengine.com/t/fstreamablehandle-in-struct-requirements/1301012/3 "2023-10-19T23:43:13Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
