Simple Getter not returning correct value

Can someone please help me figure out why neither of these return me the correct value?
I have a test blueprint in my level, and when I attempt to run either of these getter functions in a blueprint, this happens:

  • I log out what the current value of mNumIterations is, it says 8.
  • I assign / return the variable.
  • I receive 0 on the ReturnValue pin in the blueprint.

I am really clueless as to what might be going wrong here. Any help is appriciated.

int MyClass::GetNumIterations()
{
	return mNumIterations;
}

void MyClass::GetNumIterations(int& returnValue)
{
	returnValue = mNumIterations;
}

PS. MyClass is inheriting from UActorComponent just in case that would matter.
But I’m presuming more likely than not, I’m doing something wrong for the “Unreal Way”.

The variable “mNumIterations” is a protected int
The two “GetNumIterations” methods are public

Actually never mind. I was stupid.
I was trying to read the variable right before setting it.
Which the log for some reason seems to be delayed enough to still include the number that got set right after.