|
-
Sep 1st, 2024, 08:32 PM
#10
Re: Baffling error in Background worker code
 Originally Posted by Zomalaja
I'm editing a copy of a copy of the my.Resources image. I can do that successfully in a timer tick.
DOJ = My.Resources.Images.Don
Destination = DOJ
I'm changing the bitmap "Destination", 2levels away from the resource image.
It certainly doesn't look that way. Images are reference type objects so there's no copies of Images being made there. A resource is data compiled into your assembly. When you get a property of My.Resources, that data is extracted and an object created. Your first line of code does that and assigns that object to the DOJ variable. The next line doesn't copy anything. It just assigns that same object to the Destination variable. If you access those two variables on different threads at the same time, you're accessing the same object on different threads.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|