Skip to content

Comparing with null? #11

@galmok

Description

@galmok

I have implemented my own IComparer to be used with the priority queue, but I am wondering if it is a bug that my comparer occasionally gets called with null reference instead of a valid object?

I am actually not certain how I should handle null values here as I only expected to have objects from the queue passed.

The null to the comparer happens when I call Remove on the queue (with a non-null value).

The item I try to remove is NOT on the queue. Should this result in null-values being passed to the comparer?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions