Closed Eu4ng closed 1 year ago
UPROPERTY() 매크로를 설정해주어야 GC 당하지 않는다
UPROPERTY()
UEquipmentState* EquipmentState;
UPROPERTY()
UMainState* MainState;
UPROPERTY()
USubState* SubState;
언리얼 엔진 5.1 문서 오브젝트 # 레퍼런스자동업데이트
- AActor 또는 UActorComponent가 소멸되면 레퍼런스는 자동으로 null이 됩니다.
- 이 기능은 UPROPERTY로 마킹되어 있거나 언리얼 엔진 컨테이너 클래스에 저장된 레퍼런스에만 적용됩니다. raw 포인터에 저장된 오브젝트 레퍼런스는 언리얼 엔진이 알지 못하기 때문에, 자동으로 null 되거나, 가비지 컬렉션이 방지되지 않습니다.
관련 파일
버그 설명
Crash 내역
자세히 보기
Log 내역 일부
추정 원인
참고 링크