07-24-2017, 04:40 PM
(This post was last modified: 07-24-2017, 05:02 PM by Rick Johnson.)
(09-29-2016, 09:18 AM)garrett Wrote: Under the hood, CORE uses the AI SDK suites, so you can simply check if something like the sAIArt global is already acquired (and if not, acquire it yourself). If it is already acquired, do not overwrite it or release it, since CORE depends on it!
I find I'm making hybrid projects more often, and just want to make sure I'm doing this correctly and safely. As I understand, before acquiring a suite I should check if it has already been acquired by testing for a NULL pointer. If it has been acquired by CORE, will my, e.g., sAIUser which I set at NULL at startup, no longer be NULL, and available for use without acquiring it? If I acquire it, should I also set a bool variable to note for later that I acquired it and should therefore release it rather than leave it open for CORE to release? What are the rules for "playing nice" with regards to checking/acquiring/releasing suites with CORE?
Also, do I really need to make it a Prefix Header if I only reference it from the main plugin source file?
Many thanks! -- rj