Delegate functions get called even when removed

ATestActor::ATestActor(const class FPostConstructInitializeProperties& PCIP)
: Super(PCIP)
{
CollisionCapsule = PCIP.CreateDefaultSubobject(this, TEXT(“CollisionCapsule”));
RootComponent = CollisionCapsule;
Mesh = PCIP.CreateDefaultSubobject(this, TEXT(“Mesh”));
Mesh->AttachTo(RootComponent);

	// Setup clicking
	bIsSelected = false;

	// Bind picking up and dropping to mouse
	OnClicked.AddDynamic(this, &ATestActor::PickUp);
	OnReleased.AddDynamic(this, &ATestActor::Drop);
}

void ATestActor::PickUp()
{
	UE_LOG(Testing, Warning, TEXT("Picking up %s"), *GetName());
	bIsSelected = true;
}

void ATestActor::Drop()
{
	UE_LOG(Testing, Warning, TEXT("Dropping %s"), *GetName());
	bIsSelected = false;
}

Trying to get my head around delegates, for some reason this runs the same even if I comment out:

OnClicked.AddDynamic(this, &ATestActor::PickUp);
OnReleased.AddDynamic(this, &ATestActor::Drop);

What is happening? I compile once it seems it works, I compile a second time with these things commented out and I still get messages?

Try Rebuiding the project solution.
If that dose not work close visual studio/ XCode and Generate the Project Files again.

This helps me when i have this type of problem, i think its due to changes made by the UHT/UBT.

Yea, I did try all that, I deleted everything but my basic .uproject, content code. And reloaded everything it still remembers the binds even though my class does not do them anymore! I’m getting alot of crashing now also…

I’m running local build of UE4, I’m wondering how this could impact this, its vanilla UE4… I will try using an installed version see if this changes anything.

How strange that it remembers the binding. Doesn’t feel logical. This looks like its related to the UHT/UBT

Okay. It seems to be related to serialization. I fixed this by deleting the object I placed into the map and recompiling with editor closed, hot reload didn’t work. It seems I had to reload everything.

There might be a more straight forward way to do this and I’m looking into it now.

I’m assuming it wrote the information in OnClicked and OnReleased to the map. Is there a particular reason why OnClicked and OnReleased could not or better not be transient?

Edit: btw the way thanks to BlackFox on irc for figuring this out so fast. I really do recommend people discuss UE on the unrealengine irc!

Is the forum thread about unreal irc. Check it out people!