Note that size can be NULL.