I think when you first get together it's entirely normal to discuss who your last partner was, what happened etc.
Then, it might come up in an occasion matter-of-fact way, e.g. 'Have you ever been to Spain ?' 'Yeah, I went with my ex once.'
I think it also depends on how long they were together. It's quite difficult to have an ex of 20 years and to never mention them once in conversation !
But what about things such as bringing up funny/cute/sweet moments ?
Or just general anecdotes ?
Stuff that isn't really related to them