James Erickson

Greenhorn
+ Follow
since May 15, 2019
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by James Erickson

Hi, all -

I'm instantiating an object inside a method like...

cInvoker = new ClickInvoker(lastOMove);

Now, cInvoker is originally declared outside the method. I'm then trying to reference the instantiated object inside a 2nd method, but I'm finding that cInvoker is null. I think it must be getting deleted once it goes out of scope or something?

Is there anyway to copy the new object so that I can reference it outside of where it was declared?
3 months ago