jacob-project icon indicating copy to clipboard operation
jacob-project copied to clipboard

VARIANTS don't need to be in shared memory

Open EJP286CRSKW opened this issue 1 year ago • 5 comments

The JNI part of Dispatch.invokev() allocates shared memory for the array of VARIANTS.

I have determined experimentally that this is not necessary, testing about 500 different Excel APIs, having first noted that none of the Microsoft example code uses shared memory either.

It would therefore be a lot simpler to use a std::vector<VARIANT>, which would also simplify the deallocation process on exit, which is presently missed, and therefore leaked, in a number of presently unchecked error cases.

EJP286CRSKW avatar Dec 19 '23 01:12 EJP286CRSKW

code examples.

The only way to get changes is to submit a PR.

freemansoft avatar Mar 18 '24 03:03 freemansoft

I have a substantially rewritten version of Dispatch.cpp and a couple of other .cpp files which I will submit with test cases when next I get back to Jacob.

I thought this was a PR?

EJP286CRSKW avatar Mar 18 '24 03:03 EJP286CRSKW

A Pull Request is code that is intended to merge with the source tree from your repository. You've provided suggestions which I appreciate but are a bunch of work because they don't include any tests.

I picked up several of your changes tonight. VSCode reformatted any file I touched. In addition, I moved the source files all into /src from where they were on the top level. The source organization should have moved more to the maven style standard years ago.

freemansoft avatar Mar 18 '24 03:03 freemansoft

OK. I am no Git guy but I'll see what I can do.

EJP286CRSKW avatar Mar 19 '24 00:03 EJP286CRSKW

I can work with a set of files. The hard ones are "here a couple changes in 4 different files"

freemansoft avatar Mar 19 '24 01:03 freemansoft