An API is provided to automatically transition data objects or containers between
memory types to enable the seamless switching of data. The switching of data containers
from one location to another is performed automatically by the API. Thus, polygon
or pixel data objects are automatically transitioned between memory types such
that the switching is seamless. It appears to a developer as if the data chunks/containers
last forever, whereas in reality, the API hides the fact that the data is being
transitioned to optimize system performance. The API hides an optimal cache managing
algorithm from the developer so that the developer need not be concerned with the
optimal tradeoff of system resources, and so that efficient switching of data can
take place 'behind the scenes', thereby simplifying the developer's task. Data
containers are thus efficiently placed in storage to maximize data processing rates
and storage space, whether a data container is newly created or switched from one
location to another.