Ticket #420 (closed task: fixed)
Add ability to disable instance pooling
| Reported by: | tpk | Owned by: | hans |
|---|---|---|---|
| Priority: | high | Milestone: | 1.3 |
| Component: | Generator | Version: | devel |
| Severity: | normal | Keywords: | instance pooling memory leak |
| Cc: |
Description
It should be possible to disable object instance pooling, as storing the instances means they are not garbage-collectible. This is a problem for long running processes, which can either consume loads of memory for not good reason or the developer needs to keep track of relevant peer classes to run clearInstancePool() on them.
Suggested solution:
Introduce a flag in propel to disable/enable instance pooling (enabled by default) and centralize the pool management in getInstanceFromPool() / addInstanceToPool() / removeInstanceFromPool() etc methods.
That involves adding methods like (enable/disable)InstancePooling() to propel and modifying all the code that right now accesses self::$instances directly in the peer classes to use the methods that deal with pooling.
Attachments
Change History
Changed 3 years ago by tpk
-
attachment
instances.diff
added
comment:1 Changed 3 years ago by hans
- Priority changed from normal to high
- Status changed from new to assigned
- Type changed from defect to task
- Summary changed from instance pooling to Add ability to disable instance pooling
Suggested patch.