MessageStruct needs to be class that does some memory management and pointer ownership. Safely delete the new messagestruct class after the javascript method has been kicked off that moves the data