Documentation Archive Developer
Search
PATH  Documentation > WebObjects 4.5 > WebObjects Developer's Guide


Table of Contents Previous Section

Request Post-Processing

After the response has been generated, but before returning the response to the adaptor, the component action request handler concludes request handling by doing the following:

  1. It causes the sleep method-the counterpart of awake-to be invoked in all components involved the cycle (request, response, and subcomponents). As described in the chapter "Managing State", in the sleep method objects can release resources that don't have to be saved between cycles.

  2. It requests the session object to save the response page in the page cache.

  3. It invokes the session object's sleep method.

  4. It saves the session object in the session store.

  5. It invokes its own sleep method.
When an Objective-C object is about to be destroyed, its dealloc method is invoked at an undefined point in time after a cycle (indicated by the vertical ellipses in Figure 26). In the dealloc method, the object releases any retained instance variables. In WebScript, this usually happens implicitly; you therefore usually don't need to implement the dealloc method in any objects you write. In Java, objects have automatic garbage collection, so this deallocation step is unnecessary.

Note: WOApplication provides two Java methods-garbageCollectionPeriod() and setGarbageCollectionPeriod()-that allow you to get and set the amount of time between garbage collections.

Table of Contents Next Section