Skip to content

Memory leak: Pipecat and DailyTransport instances retained after disconnect #30

@pietro-miotto-akcelo

Description

@pietro-miotto-akcelo

After connecting to the backend and then disconnecting, the SDK still retains references to the Pipecat client and the DailyTransport client.
This leads to a memory leak — every connect/disconnect cycle increases retained instances and total memory usage.

This issue occurs both in my own SwiftUI app and when testing the official simple chatbot example included in the Pipecat iOS SDK repository.

Steps to Reproduce
1. Launch the simple chatbot example or equivalent setup using PipecatClient with DailyTransport.
2. Call connect() to establish a session.
3. Call disconnect() to end the session (set delegate to nil, call disconnect as release).
5. Release all strong references on the app side (set to nil or let the controller deinit).
6. Repeat steps 2–4 multiple times.
7. Observe in Instruments (Allocations or Leaks) that instances of Pipecat and DailyTransport are never released.

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions