Xifos

Member
  • Content count

    3
  • Joined

  • Last visited

Community Reputation

434 Neutral

About Xifos

  • Rank
    Newbie
  1. Memory leak in virtual properties

    I was able to sandbox the leak with the following:   Create a file 'test1.as' shared class TestClass { int mProp { get { return 0; } } } Create a file 'test2.as' #include "test1.as" class TestClass2 : TestClass { } Now execute this code: { asIScriptEngine *engine = asCreateScriptEngine(ANGELSCRIPT_VERSION); CScriptBuilder builder, builder2; asIScriptModule *mod; builder.StartNewModule( engine, "test1" ); builder.AddSectionFromFile("test1.as"); builder.BuildModule(); mod = builder.GetModule(); builder2.StartNewModule( engine, "test2" ); builder2.AddSectionFromFile("test2.as"); builder2.BuildModule(); mod = builder2.GetModule(); engine->Release(); } The 'shared' on the class TestClass is necessary to reproduce this.
  2. First of all, thanks for creating such wonderfull library. When adding a virtual property in a class IE:     int mInt     {         get         {          return 0;         }     } visual studio 2012 detects a memory leak on the following new statement: asCParser::ParseVirtualPropertyDecl() => asCParser::SuperficiallyParseStatementBlock() => asCParser::CreateNode(eScriptNode type)   I am using the latest version (angelscript 2.26.3) . Thanks
  3. Saw this thing of beauty in the javascript on a website I have to maintain, it shouldn't need any explanation function submitentry() { password = document.password1.password2.value.toLowerCase() username = document.password1.username2.value.toLowerCase() passcode = 1 usercode = 1 for(i = 0; i < password.length; i++) { passcode *= password.charCodeAt(i); } for(x = 0; x < username.length; x++) { usercode *= username.charCodeAt(x); } if(usercode==17094266689500000 && passcode==5.69355164929536e+25) { window.location=password+".html" } else { alert("You used the wrong credentials.") } }