debug Posted April 27, 2016 Author Share Posted April 27, 2016 You are creating new instances of those actions every loop ... Should only create one instance of it, best way to do this is in the onStart() method.. After that you can actually run those instances int he onLoop I was just following this tutorial: http://osbot.org/forum/topic/58775-a-beginners-guide-to-writing-osbot-scripts-where-to-get-started-by-apaec/ Quote Link to comment Share on other sites More sharing options...
Khaleesi Posted April 27, 2016 Share Posted April 27, 2016 I was just following this tutorial: http://osbot.org/forum/topic/58775-a-beginners-guide-to-writing-osbot-scripts-where-to-get-started-by-apaec/ Ya I see, but this part is really poor switch (state) { case CHOP: new Chop(this); break; case DROP: new Drop(this); break; case IN_COMBAT: new InCombat(this); default: break; } bascily every 50 milliseconds you are making a new instance of Chop()... Why not create one ion onstart() and just do chop.run(); in your switch statement? Atleast that would solve the huge memory usage here 1 Quote Link to comment Share on other sites More sharing options...
Explv Posted April 28, 2016 Share Posted April 28, 2016 You are creating new instances of those actions every loop ... Should only create one instance of it, best way to do this is in the onStart() method.. After that you can actually run those instances int he onLoop Or you know, he could learn Java pls baws Quote Link to comment Share on other sites More sharing options...
hansen19498 Posted April 29, 2016 Share Posted April 29, 2016 雅我明白了,但这部分是真穷 开关(州){ 案例CHOP: 新的印章(本); 打破; 这样滴: 新的投递(本); 打破; 案例IN_COMBAT: 新InCombat(本); 默认: 打破; } bascily每隔50毫秒要制作印章的新实例()... 为什么不创建一个离子的OnStart()和刚做chop.run(); 在switch语句? ATLEAST这将解决这里巨大的内存使用情况 If you are able to speak to express a simple code (adhesive out),, for a foreigner like me, is a blessing. I have been watching the code changes to understand the function and role. In other words I used Google translation to see your comments, it seems very important, I think I should go to correct my code, but because of the translation, to see a few times I could not understand, I should specify how changes (in should be added or modified local add comments, it would be great) Quote Link to comment Share on other sites More sharing options...