You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
Stats - Fixed a memory leak in the UFE, added better implementation for the stats advance frame
#codereview Robert.Manuszewski [CL 2103266 by Jaroslaw Surowiec in Main branch]
This commit is contained in:
committed by
UnrealBot
parent
c50537fa33
commit
f3b04ddb1c
@@ -77,7 +77,6 @@ bool RunDeployCommand()
|
||||
|
||||
double DeltaTime = 0.0;
|
||||
double LastTime = FPlatformTime::Seconds();
|
||||
static int32 MasterDisableChangeTagStartFrame = -1;
|
||||
|
||||
// We track the message sent time because we have to keep updating the loop until the message is *actually sent*. (ie all packets queued, sent, buffer flushed, etc.)
|
||||
double MessageSentTime = 0.0;
|
||||
@@ -222,6 +221,7 @@ void WriteString(FArchive* File, const ANSICHAR* Format, ...)
|
||||
|
||||
void RunStatsConvertCommand()
|
||||
{
|
||||
#if STATS
|
||||
// get the target file
|
||||
FString TargetFile;
|
||||
FParse::Value(FCommandLine::Get(), TEXT("-INFILE="), TargetFile);
|
||||
@@ -337,9 +337,9 @@ void RunStatsConvertCommand()
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endif // STATS
|
||||
}
|
||||
|
||||
|
||||
void RunUI()
|
||||
{
|
||||
FString UnrealFrontendLayoutIni = FPaths::GetPath(GEngineIni) + "/Layout.ini";
|
||||
@@ -409,7 +409,6 @@ void RunUI()
|
||||
double DeltaTime = 0.0;
|
||||
double LastTime = FPlatformTime::Seconds();
|
||||
const float IdealFrameTime = 1.0f / IDEAL_FRAMERATE;
|
||||
static int32 MasterDisableChangeTagStartFrame = -1;
|
||||
|
||||
while (!GIsRequestingExit)
|
||||
{
|
||||
@@ -430,11 +429,7 @@ void RunUI()
|
||||
DeltaTime = CurrentTime - LastTime;
|
||||
LastTime = CurrentTime;
|
||||
|
||||
#if STATS
|
||||
FThreadStats::ExplicitFlush();
|
||||
FThreadStats::WaitForStats();
|
||||
MasterDisableChangeTagStartFrame = FThreadStats::MasterDisableChangeTag();
|
||||
#endif
|
||||
FStats::AdvanceFrame( false );
|
||||
|
||||
GLog->FlushThreadedLogs();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user