FACTOID # 30: Finns are perhaps the world's greatest athletes, ranking first in medals per capita for Summer Olympics, and third for Winter Olympics.
 
 Home   Encyclopedia   Statistics   Countries A-Z   Flags   Maps   Education   Forum   FAQ   About 
 
WHAT'S NEW
RECENT ARTICLES
More Recent Articles »
 

FACTS & STATISTICS    Simple view

  1. Select countries to view: (hold down Control key and click to select several)

     

     

    Compare:

     

     

  1. Select fact or statistic: (* = graphable)

     

     

     

  2. (OPTIONAL) Compare to statistic: (both need to be graphable)

     

     

     

  3. View result as:

     

       
(OR) SEARCH ALL encyclopedia, stats & forums:   

Encyclopedia > Object pool

In computer programming, an object pool is a construct of objects which can be used concurrently. In a typical situation, an object which requires resources which are managed by the object pool will request an object and perform operations on that object. Object pooling offers a significant performance boost and is most efficient in situations where the cost of initializing a class instance is high and the amount of instantiations of a particular class is also frequent. Wikibooks has more about this subject: Computer programming Computer programming (often simply programming) is the craft of implementing one or more interrelated abstract algorithms using a particular programming language to produce a concrete computer program. ...


If no objects are available in the pool, a new object is created and returned to the pool when it has been dereferenced (it's no longer being used). This allows for control of resources and limits the amount of work necessary to instantiate and initialize new objects. The object pool will release objects within the pool when requests for objects diminishes.


This contruct is typically employed in software in situations where instantiating an object is prohibitively expensive, or the object itself uses a significant amount of resources and must be controlled in a fixed pool size.


If objects within the pool contain state which is only reset at construction, it is possible to end up with an object cesspool. This occurs when objects in the pool contain stale state from previous usage, which should have been reset before the object was handed to the client. The presence of stale state is not always an issue; it becomes dangerous when the presence of stale state causes the object to behave differently. For example, an object that represents authentication details may break if the "successfully authenticated" flag is not reset before it is passed out; however, it will work just fine if you fail to reset the identity of the last authentication server used. Generally, this problem is avoided by amending the objects in the pool to include a "reset state" method, which is called just before the object is handed out and which resets any dangerous state to the construction defaults. This article is being considered for deletion in accordance with Wikipedias deletion policy. ...


  Results from FactBites:
 
Object Oriented Design and Programming - Software Design Principles and Design Patterns - Object Pool (1244 words)
Singleton reusable pool - The reusable pool is implemented as a singleton.
In object pool can be implemented a mechanism to check when a specific resource was used last time and if the time expired, to return it to the available resource pool.
Althrough the object pool is handling the object instantiation it's main purpose is to provide a way for the clients to reuse the objects like they are new objects, without being shared and reused.
Heap of Fish Java Applet - an Interactive Illustration of Garbage Collection (1649 words)
The object pool is a contiguous block of memory from which space is taken for new objects.
When a new object is allocated, the object pool is traversed until a memory block is encountered with enough space to accommodate the new object.
The object pool index functions as a reference to the object's instance data in the object pool.
  More results at FactBites »


 

COMMENTARY     


Share your thoughts, questions and commentary here
Your name
Your comments
Please enter the 5-letter protection code

Want to know more?
Search encyclopedia, statistics and forums:

 


Lesson Plans | Student Area | Student FAQ | Reviews | Press Releases |  Feeds | Contact
The Wikipedia article included on this page is licensed under the GFDL.
Images may be subject to relevant owners' copyright.
All other elements are (c) copyright NationMaster.com 2003-5. All Rights Reserved.
Usage implies agreement with terms.