How COM Object gets removed from the memory?
Suppose there are 4 clients using our COM Component, One by One they goes out of scope ..At which point the component knows that it has to unload from memory.? Once the COM Object's reference count reached to zero then at this point which mechanism works to remove it from the memory.
Once the COM Object's reference count reached to zero then at this point which mechanism works to remove it from the memory.
It is a responsibility of the COM object developer. When the reference count goes to zero then there are no references pending on the object (probably there aren't...: the reference count is shared mechanism of both the COM server and the client) and the object may choose to free its COM resources (as it usually do).
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
I have a file which is in binary mode.(I am using stdio functions fwrie,fread,fseek)
I have to read this file in binary mode and needs to replace some of the bytes in this file.
It contains around 1000 entries with 2 bytes each.
I know the location of bytes which is to be changed, like 100th entry.
Is there anyway to change that specific bytes, without copying in to other file.
As I have small memory I can not copy into other file and recopy with changed bytes.
So on the fly i want to change specific bytes.
please tell me if any method is there to do this.?