Preparing Channels for Modification
 
 
 

At certain times the system must ask the plug-in object to prepare certain channels for modification. However, a channel that is locked should not be modified.

For example, if a channel is cached upstream in the pipeline, and was modified, the cached version would be modified as well (since they both point to the same memory). This would confuse the system and thus locked channels must not be modified. If the system needs to modify one of the channels it will call the method Object::ReadyChannelsForMod(), which is implemented by the system.

This method will take the channels that are locked and allocate a new block of memory for them. It will then copy the locked channels into the new block of memory and set the new memory as the current channel. It does this by calling Object::NewAndCopyChannels() which is implemented by the plug-in. In this way the system can modify the channels and not affect the cached copy as they no longer point to the same memory. Then it will unlock the channel.