diff -r ebc84c812384 -r 46218c8b8afa Symbian3/PDK/Source/GUID-88E610C1-6662-5A12-B950-B695A7EB776C.dita --- a/Symbian3/PDK/Source/GUID-88E610C1-6662-5A12-B950-B695A7EB776C.dita Thu Mar 11 15:24:26 2010 +0000 +++ b/Symbian3/PDK/Source/GUID-88E610C1-6662-5A12-B950-B695A7EB776C.dita Thu Mar 11 18:02:22 2010 +0000 @@ -1,25 +1,25 @@ - - - - - -How to cleanup streams

The Store framework makes extensive use of the cleanup stack.

Before read streams or write streams are disposed of, for example, when an RStoreWriteStream or RStoreReadStream object goes out of scope, resources acquired by the stream objects must be released.

The easiest way to do this is to use the CreateLC(), OpenLC(), AppendLC() and ReplaceLC() variants that put a cleanup item onto the cleanup stack.

Before disposing of the read or write stream object, but after any data is committed, call CleanupStack::PopAndDestroy(). For example:

... -TStreamId id = outstream.CreateLC(*store); -... -outstream.CommitL(); -... -CleanupStack::PopAndDestroy(); -...

For write streams, data must be committed to the stream before releasing resources.

Alternatively, if the CreateL(), OpenL(), AppendL() and ReplaceL() variants are used, then an explicit call to PushL() must be made to put a cleanup item onto the cleanup stack. For example:

... -TStreamId id = outstream.CreateL(*store); -outstream.PushL(); -... -outstream.CommitL(); -... -CleanupStack::PopAndDestroy(); + + + + + +How to cleanup streams

The Store framework makes extensive use of the cleanup stack.

Before read streams or write streams are disposed of, for example, when an RStoreWriteStream or RStoreReadStream object goes out of scope, resources acquired by the stream objects must be released.

The easiest way to do this is to use the CreateLC(), OpenLC(), AppendLC() and ReplaceLC() variants that put a cleanup item onto the cleanup stack.

Before disposing of the read or write stream object, but after any data is committed, call CleanupStack::PopAndDestroy(). For example:

... +TStreamId id = outstream.CreateLC(*store); +... +outstream.CommitL(); +... +CleanupStack::PopAndDestroy(); +...

For write streams, data must be committed to the stream before releasing resources.

Alternatively, if the CreateL(), OpenL(), AppendL() and ReplaceL() variants are used, then an explicit call to PushL() must be made to put a cleanup item onto the cleanup stack. For example:

... +TStreamId id = outstream.CreateL(*store); +outstream.PushL(); +... +outstream.CommitL(); +... +CleanupStack::PopAndDestroy(); ...
\ No newline at end of file