PDA

View Full Version : Passing instance of PluginAPI around



h1280
08-23-2011, 02:25 PM
Is it ok for other non-plugin classes to obtain a reference or even store it in the class's field?

tcarr
08-23-2011, 02:36 PM
Sure is. I've done it myself. You want to be careful not to cause a memory leak, but other than that, go for it. In 2009 I was on a team where we passed the same api object to dozens of non-plugin classes.