강의

멘토링

커뮤니티

Inflearn Community Q&A

bsjeon875892's profile image
bsjeon875892

asked

[MMORPG Game Development with C++ and Unreal Series] Part 4: Game Server

SendBuffer

GSessionManager관련 생성 순서에 문제가있는것같습니다

Written on

·

356

0

GSessionManager를 전역변수로 추가하면서 allocator한 초기화(pool)가 안된 상태로 session의 set stl할당을 시도하게되어 문제가되는것 같습니다.

다만 Stomp allocator를 사용하는경우는 pool을사용하지않아 잠재적문제가있음에도 넘어가고있는것같아요. 

따라서 세션매니져생성시점이 CoreGlobal이 초기회된뒤여야할것 같습니다

networkMMORPGwindows-server

Answer 2

0

bs Jeon님의 프로필 이미지
bs Jeon
Questioner

네 Server쪽 main함수에 시작하는 시점에 세션 매니저를 생성하도록 변경하여 동작을 시켰습니다.

0

Rookiss님의 프로필 이미지
Rookiss
Instructor

아 그럴 수 있습니다.
그렇다면 GameSessionManager* 타입으로 만들고,
Main 함수에서 직접 new를 해서 적당히 우회해주시기 바랍니다.
예전 회사 코드에서는 Main 안에서 다 순서 맞춰 new를 했던 기억이 있네요.

bsjeon875892's profile image
bsjeon875892

asked

Ask a question