Skip to content

RecordSet and RowFilter: bad use of reference counter #1532

@obiltschnig

Description

@obiltschnig

RowFilter is derived from RefCountedObject, which is fine for the intended purpose. However, RecordSet uses a plain pointer in its interfaces to pass and obtain the RowFilter instance. This should be changed to a Poco::AutoPtr. Also, a Poco::AutoPtr should be used by RecordSet to hold the RowFilter instance instead of a plain pointer and manually calling duplicate()/release().

Furthermore, RowFilter calls duplicate()/release() on itself in init(), and its destructor, respectively. This is plainly wrong as it will prevent ever deleting a RowFilter instance.

@aleks-f

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions