This message was posted on behalf of Intel Corporation
Thank you for your contacting Intel® RealSense™ Technology support.
For future references, your ticket number is 03421485. Please keep this number handy in case you are asked for it.
To answer to your questions:
It is okay to instantiate the frameset outside of the while loop, there will be no adverse effects.
It is also okay to use the memory function.
I hope you find this information useful.
Please, let us know if further assistance is required or if we can close this case.
Intel Customer Support