Memory leaks: Improved handling of allocation functions that contains ::. Ticket: #4494