Wrote new code? Fixed a bug? Want to discuss technical stuff? Feel free to post it here.
Moderator: Moderators
Technology
Super Moderators
Posts: 801 Joined: 06 May 2008, 12:47
Noob?: No
#1
Post
by Technology » 18 Jan 2010, 20:57
I think we need to do this:
Code: Select all
Index: Plugins.pm
===================================================================
--- Plugins.pm (revision 7094)
+++ Plugins.pm (working copy)
@@ -393,6 +393,7 @@
foreach my $singleHandle (@{$handle}) {
delHook($singleHandle);
}
+ undef @{$handle};
} elsif (isa($handle, 'Plugins::HookHandle') && defined $handle->[HOOKNAME]) {
my $hookName = quarkToString($handle->[HOOKNAME]);
@@ -403,6 +404,7 @@
}
delete $handle->[HOOKNAME];
delete $handle->[INDEX];
+ undef $handle;
if ($hookList && $hookList->size() == 0) {
delete $hooks{$hookName};
look what hack i had to pull off to check if the array of hooks weren't already deleted:
https://openkore.svn.sourceforge.net/sv ... amefort.pl
One ST0 to rule them all? One PE viewer to find them!
One ST_kRO to bring them all and in the darkness bind them...
Mount Doom awaits us, fellowship of OpenKore!
kali
OpenKore Monk
Posts: 457 Joined: 04 Apr 2008, 10:10
#2
Post
by kali » 19 Jan 2010, 09:25
Hm, could this also contribute to possible memory leaks if you reload plugins over and over?
Got your topic trashed by a mod?
Trashing topics is one click, and moving a topic to its proper forum is a lot harder. You expend the least effort in deciding where to post, mods expend the least effort by trashing.
Have a nice day.
Technology
Super Moderators
Posts: 801 Joined: 06 May 2008, 12:47
Noob?: No
#3
Post
by Technology » 19 Jan 2010, 21:37
some other fixes (and rewrite of selective plugin loading)
You do not have the required permissions to view the files attached to this post.
One ST0 to rule them all? One PE viewer to find them!
One ST_kRO to bring them all and in the darkness bind them...
Mount Doom awaits us, fellowship of OpenKore!
Technology
Super Moderators
Posts: 801 Joined: 06 May 2008, 12:47
Noob?: No
#4
Post
by Technology » 20 Jan 2010, 16:27
just noticed, this was missing
under
Code: Select all
message T("Loading all plugins (by default)...\n", 'plugins');
commit?
One ST0 to rule them all? One PE viewer to find them!
One ST_kRO to bring them all and in the darkness bind them...
Mount Doom awaits us, fellowship of OpenKore!
kLabMouse
Administrator
Posts: 1301 Joined: 24 Apr 2008, 12:02
#5
Post
by kLabMouse » 21 Jan 2010, 03:57
If code is checked and rechecked, and working fine. Then just commit.
Technology
Super Moderators
Posts: 801 Joined: 06 May 2008, 12:47
Noob?: No
#6
Post
by Technology » 21 Jan 2010, 16:35
tested by me and comitted
One ST0 to rule them all? One PE viewer to find them!
One ST_kRO to bring them all and in the darkness bind them...
Mount Doom awaits us, fellowship of OpenKore!