Yep. One complication is that I don't want to write the same code,
basically, twice: once in Java for Android and once in C++ for iOS
(and potential other software on other platforms where one would want
to use LO code to load documents and render pages into bitmaps). So
need to come up with some suitable way to share code.
In that case, I would have thought that the DocumentLoader code should be
implemented in C++ and called via the JNI.
Tue, but I am afraid then we would have to manually manage the
lifetime of C++ objects and have separate JNI functions to deallocate
them; the nice thing when doing UNO calls from Java is that the
UNO-wrapped C++ objects get handled like normal Java objects and just
becoming unreachable means they will get GCed eventually, and the
finalization that precedes being GCed trickles down as destruction on
the C++ side.
Still if one considers that we will be playing with significantly
large bitmap buffers, maybe manually deallocating them is not that
bad, then we can deallocate such a buffer with certainty right when we
know it isn't needed. On the other hand, that also then means that we
can forget to deallocate, and then leaks are much more bad, or
deallocate too early, etc etc all the usual heap corruption that one
lacks in a GCed environment;)
Yeah sounds like we're at a similar level. I wouldn't say I've used it "for
real" I've used it for some university assignments which is quite different.
I should say that most of the coding I've done has been on PCs not android
but I don't envisage much of a problem given what we intend to do is
(graphics-wise) quite straightforward (famout last words...)
--tml
Context
- Re: Hello, how is it going? · Tor Lillqvist
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.