It appears that those allocators are supposed to reside on the client side but are provided by Irrlicht. Neither of those classes are exported. Also the first class seems to wrap the new but yet performs the same exact call as the second class only in a private function. I have no idea why they say one is safe and one is not or why it matters when none of them are exported.
You can use a reference counted smart pointer as long as when the pointer goes out of scope it calls the DLL to clean up the memory. This is a very specific type of smart pointer relative to the DLL or relative to DLLs that match a certain interface so boost would not work...that is....unless you made use of it's custom deleter. The DLL can provide a specific smart pointer template class that is to be used by clients of the DLL yet the DLL does not have to export the template. It is a convenience header provided by the DLL.