Notes on ADO use

BSTR of ADO does reference counting and when reference counting becomes 0, BSTR will be automatically released, however, it is not released immediately but does string pooling internally. As a result of this, a memory lack error might occur due to memory use increase. The use of memory will increase continuously when the speed of new string allocation is faster than the speed of releasing string that is not used.

For example, in case of receiving RecordSet by massive data query frequently, BSTR is continuously allocated in proportion to data size, so the use of memory will increase. The possible alternative to the above issue is not to use BSTR String Pooling by registering environment variables as below.

OANOCACHE 1