The technique used by the author in this passage is indirect characterization.
Here, the author is showing the reader through dialogue an important trait of his character: he has a very good memory and can remember a great deal about the people he meets.
However, the author is not expresively telling the reader about this characteristic; rather, he is showing it through the character's speech.