[sword-devel] Delays in rendering?

Greg Hellings greg.hellings at gmail.com
Sat Feb 28 22:53:25 MST 2015


David,

It's most common to pass it around as a pointer, that way you're
guaranteed that there's only a single instance and you don't incur
overhead from allocating on the stack.

--Greg

On Sat, Feb 28, 2015 at 11:44 PM, David Judah's Shadow Blue
<yudahsshadow at gmx.com> wrote:
> So, I'm trying this now, and I’m getting some seg faults. Can I pass my
> SWMgr library around inside different objects by assigning it to properties?
> (i.e. class.setLibrary(sword::SWMgr library) { this->swordLibrary = library;
> }) or do I need be sending it around via parameters via reference?
>
> Sent from Windows Mail
>
> From: Greg Hellings
> Sent: ‎Sunday‎, ‎February‎ ‎22‎, ‎2015 ‎3‎:‎36‎ ‎PM
> To: SWORD Developers' Collaboration Forum
>
> sword::SWMgr library (new sword::MarkupFilterMgr (sword::FMT_PLAIN));
>
> This line of code should only be executed once at program start-up and
> any time you detect a change in the installed modules - basically
> after interacting with the install manager to install a new work.
> (Even then there might be a refresh option, as the instantiation of
> the manager not only searches for modules but also for installed
> locale files). If you move that to a location where it does not
> execute every time navigation changes, you should see substantially
> improved performance.
>
> _______________________________________________
> sword-devel mailing list: sword-devel at crosswire.org
> http://www.crosswire.org/mailman/listinfo/sword-devel
> Instructions to unsubscribe/change your settings at above page



More information about the sword-devel mailing list