Release cache: Difference between revisions
mNo edit summary |
|||
Line 1: | Line 1: | ||
This method permits the Repository object to release the memory occupied by Interface Repository objects that have been implicitly referenced. | This method permits the Repository object to release the memory occupied by Interface Repository objects that have been implicitly referenced. | ||
==Syntax== | ==Syntax== | ||
Line 10: | Line 10: | ||
==Parameters== | ==Parameters== | ||
;receiver (Repository) | ;receiver (Repository):A pointer to an object of class Repository representing SOM's Interface Repository. | ||
:A pointer to an object of class Repository representing SOM's Interface Repository. | ;env (Environment *):A pointer where the method can return exception information if an error is encountered. | ||
;env (Environment *) | |||
:A pointer where the method can return exception information if an error is encountered. | |||
==Returns== | ==Returns== | ||
rc | rc | ||
==Remarks== | ==Remarks== | ||
This method allows the Repository object to release the memory occupied by implicitly referenced Interface Repository objects. Some methods (such as describe_contents and lookup_name) may cause some objects to be instantiated that are not directly accessible through object references that have been returned to the user. These objects are kept in an internal Interface Repository cache until the release_cache method is used to free them. The internal cache continuously replenishes itself over time as the need arises. | This method allows the Repository object to release the memory occupied by implicitly referenced Interface Repository objects. Some methods (such as describe_contents and lookup_name) may cause some objects to be instantiated that are not directly accessible through object references that have been returned to the user. These objects are kept in an internal Interface Repository cache until the release_cache method is used to free them. The internal cache continuously replenishes itself over time as the need arises. | ||
See the section entitled "A word about memory management" in the Interface Repository Framework in the SOM Toolkit User's Guide. | See the section entitled "A word about memory management" in the Interface Repository Framework in the SOM Toolkit User's Guide. | ||
==Original Class== | ==Original Class== | ||
Repository | Repository | ||
==Example Code== | ==Example Code== | ||
<pre> | <pre> | ||
#include <repostry.h> | #include <repostry.h> | ||
Latest revision as of 22:03, 7 November 2021
This method permits the Repository object to release the memory occupied by Interface Repository objects that have been implicitly referenced.
Syntax
Repository receiver; Environment *env; release_cache(receiver, env);
Parameters
- receiver (Repository)
- A pointer to an object of class Repository representing SOM's Interface Repository.
- env (Environment *)
- A pointer where the method can return exception information if an error is encountered.
Returns
rc
Remarks
This method allows the Repository object to release the memory occupied by implicitly referenced Interface Repository objects. Some methods (such as describe_contents and lookup_name) may cause some objects to be instantiated that are not directly accessible through object references that have been returned to the user. These objects are kept in an internal Interface Repository cache until the release_cache method is used to free them. The internal cache continuously replenishes itself over time as the need arises.
See the section entitled "A word about memory management" in the Interface Repository Framework in the SOM Toolkit User's Guide.
Original Class
Repository
Example Code
#include <repostry.h> ... Repository repo; Environment *ev; sequence(ContainerDescription) scd; ... scd = Container_describe_contents ( (Container) repo, ev, "TypeDef", TRUE, -1); Repository_release_cache (repo, ev);