General legal point, Darren. I've often seen films where a barrister goes a bit off-piste to prove a point. The opposition objects and the judge says 'Upheld. The jury are not to take heed of that last point.'
But in reality, they will, surely? The seed has been planted and, unless the jurors are busy Tweeting or haven't a basic grasp of English, they will have heard and considered the point.
No-one goes "objection" in English courts - you have been watching too many American court dramas

In reality if a barrister asked a question he shouldn't ask, the opposing barrister will generally leap in before the witness answers and says that he has a legal point to raise. The jury are then sent out and the opposing barrister will explain why he thinks the question shouldn't be asked. The judge will then rule on that point in the absence of the jury and, if the judge rules that the question shouldn't be asked, then the jury will never get to hear the witness' answer. Obviously the question is not evidence, only the witness' answer is evidence and the jury are told that over and over.
Such things like that actually very rarely happen. Barristers know what they can and can't ask and if a barrister kept asking impermissible questions, he would soon get struck off. Hence they don't do that.
In a very rare situation where a barrister asks an impermissible question and the witness answers, if the issue was sufficfiently serious, the jury would be discharged, there would be a re-trial and the barrister would be in serious shit.