How do I make a callback to delete an instance of a class that exists in a another class?

I making a program that simulates what happens in a Chat Application. Here I have a class named Person(Client) and a class named Room(server), that contains Person instances in an List. I have figured out how a Person can receive a message, but when a Person can no longer receive, how can I make a callback in Room class and remove the instance of that Person from the Room?

public class Person
{
    readonly IConnection connection;
    string remainingMessage = "";

    public Person(IConnection connection)
    {
        this.connection = connection;
    }

    public Message Read()
    {
        byte[] buffer = new byte[20];
        string text = remainingMessage;

        while (true)
        {
            int position = text.IndexOf();
            if (position != -1)
            {
                remainingMessage = text.Substring(position + 1);
                return new Message(text.Substring(0, position));
            }
            int read = connection.Read(buffer, 0, buffer.Length);
            if (read == 0)
            {
            // callback in Room to remove this person
            }
            text += Encoding.ASCII.GetString(buffer, 0, read);
        }
    }
}

public class Room
{
    List<Person> personsList = new List<Person>();
    readonly IConnection connection;

    public Room(IConnection connection)
    {
        this.connection = connection;
    }

    public void AddPerson(Person person)
    {
        personsList.Add(person);
    }

    public void Leave(Person person)
    {
        personsList.Remove(person);
    }
```

What you need are managed pointers, and something like boost::shared_ptr / boost::weak_ptr would fit the bill here. But if you don’t want to use 3rd party libraries, then you’ll have to invent it yourself.

Dafont Adam4adam