TArray::Num() and other methods crash the engine

I don’t have a clue why, but in one of my classes, calling TArray methods crash the engine. like it were a nullptr to TArray, rather than a regular member value. why does it even happen? i use TArrays for so long so far and didn’t encounter such a behaviour.

UCLASS( ClassGroup=(Custom), meta=(BlueprintSpawnableComponent) )
class DEGRADATION_ERA_API UInventory : public UActorComponent
{
	GENERATED_BODY()

public:	
	...
	TArray<int> array_temp; // <int> just for the sake of test simplicity. fails for other types too.
        ...
        void foo(){array_temp.Add(5);} // No matter if i try to Add(), Num() or whatever other method of TArray, it just crashes the engine upon running.
};

Okay i am an idiot.

This is a UActorComponent child class and i have forgot to init the component in his parent actor:

inventory =  CreateDefaultSubobject<UInventory>(TEXT("inventory")); //in Actor constructor

FIN