Don't #include <memory.h> but #include <string.h> to avoid header clash under MacOS. I don't think this affects other platforms.