View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0002924 | JEDI VCL | 00 JVCL Components | public | 2005-05-02 00:30 | 2005-05-14 13:29 |
| Reporter | matthius | Assigned To | |||
| Priority | normal | Severity | minor | Reproducibility | always |
| Status | closed | Resolution | open | ||
| Product Version | 3.00 | ||||
| Target Version | Fixed in Version | ||||
| Summary | 0002924: The object Image is not freed on the event OnGetImage in the JvLookup | ||||
| Description | The method Paint in the TJvDBLookupList, TJvDBLookupCombo does not free the Image variable which is assigned if the event OnGetImage assigns the Graphic variable. It creates a memory leak... You just have to free The Image variable after drawing it in the method paint... | ||||
| Tags | No tags attached. | ||||
|
|
I think you made a wrong usage of this event. Creating an image everytime a component is painted is really slow, you have to create a list of images and return one of these images in the event handler. |
|
|
I agree. Further to this, it is a good programming principle for a method should not free the objects it is given, unless specifically stated otherwise. |