Fix possible memory leaking in PacketReader

Description

PacketCollectors and PacketListeners are stored in PacketReader. When they are removed PacketReader will set a null value to the collection instead of removing the slot in the collection. If new collectors or listeners are added to the packet reader then they are adding as new elements to the collection. Null slots are removing when processing incoming packets. Therefore, if no new packets are received (e.g. connection lost or server freezed) then it is possible for an application to remove listeners/collectors and create new ones. This action will end up consuming Smack's memory producing high loads of CPU to clean up garbarge that is never gone.

Environment

None

Activity

Show:
Fixed

Details

Assignee

Reporter

Components

Fix versions

Affects versions

Priority

Created July 7, 2006 at 11:25 PM
Updated July 10, 2006 at 11:52 PM
Resolved July 10, 2006 at 11:52 PM