Using sizeof for getting jbyteArray size
843829Aug 4 2010 — edited Aug 4 2010I can't seem to figure out why when I do sizeof(byte_array) I always get 8 in C++, no matter what. When I call env->NewByteArray(size_of_byte_array_in_bits), I pass it let's say 120,000, it creates the byte array and I can call GetByteArrayElements(byte_array, NULL) I can see all my elements inserted, but nevertheless sizeof(byte_array) returns an 8. I'm just trying to create a byte array of 15MB and testing to make sure that it is 15MB but I don't know if this will work.