Libbulletjme.so chashed after application destroy,

… That article is from 2004 and talks about Java 1.4.1… jME 3 uses 1.6 (I could be wrong about that version though as I might be a version or 2 below what is the default).

Plus… Again… Your article goes against what you’re suggesting.

A third category where developers often mistakenly think they are helping the garbage collector is the use of System.gc(), which triggers a garbage collection (actually, it merely suggests that this might be a good time for a garbage collection). Unfortunately, System.gc() triggers a full collection, which includes tracing all live objects in the heap and sweeping and compacting the old generation. This can be a lot of work. In general, it is better to let the system decide when it needs to collect the heap, and whether or not to do a full collection.

Especially the bit at the end.

1 Like

only for android, but java on android isn’t normal java :wink:

1 Like

it’s ok post a topic - solved

use best practice
free memory

1 Like

KEK is this horse_js of jmonkey?

You are just changing the address of a reference you are not creating any new variable.

Makes literally 0 sense. Sometimes it does, this time it doesn’t. At all.

Also you are talking about micro optimization when you’ve built your for in the worst possible way. You need at least 9 000 micro optimization to break even.

3 Likes

heh. True dat.

What version is it up to normally? 8?

1 Like

I mean in the case with android, java is just a language which doesn’t work on JVM, so many things of how java works aren’t related to java on android.

1 Like

The allocation of memory for creating a variable occurs once

Yes. i use mysql php netbeans (with many components) libraries.
If everyone is well optimized, this gives the overall result

1 Like

You are not allocating memory.

2 Likes

In this case, we pass it by reference.
But I still would not want to do it in a loop.

The variable declaration also spends time and resources

reference automatically deleted when method will exit.

in link to stack overflow speak: the use of space - has the meaning

1 Like

Uses java → worries about variables delcaration.
This is not even a micro optimization, this is ocd

If you are for real, you should rethink about your priorities and figure out that saving 0.0000001 ns is not worth the effort expecially when you make shitty code everywhere else.

If you are a troll: 10/10

3 Likes

Isn’t the general rule of thumb “build first optimize later”? It’s how I’ve always worked.

Sure don’t be ignorant of standard practices etc. But the REAL goal is to get the thing working first, then working well second.

2 Likes

We conducted many tests of performance differences, for example:

  1. i ++ and i + = 1

It matters when there is a processing of the database in a few gigabytes using the program code

1 Like
1 Like

Uses php → worries about variables delcaration in java.

4 Likes

In java is convenient and automated

  1. garbage collection
  2. Cross-platform
    But often complain about process memory and speed
    I’m trying to work like this

and pspeed talk “byte code”

1 Like

But those of us who know better already know your test was flawed because the two loops produce identical byte code.

You don’t even know enough to understand what that means and keep posting random links that support our point and not yours.

2 Likes

PS: When I rewrite the web server on C and it will work faster. and use less memory

1 Like

My point of view is not to argue with you
And in that would make the code better

1 Like

You made your loop successively worse. It’s bad advice. There is no good reason to do it and many bad reasons to do it. You don’t have enough experience to understand this.

Go ahead and put together a microbench mark showing your case… we will show you why it’s wrong.

1 Like

http://bit.ly/2eOfyrR

3 Likes