aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGravatar TheXception2007-04-23 09:09:03 +0000
committerGravatar TheXception2007-04-23 09:09:03 +0000
commit6b81dbd1305f1fbabc8f11d11eb3f8e4e0de38da (patch)
treee862fd9c2e3f7df3bdb0f4add484dc72d7efa411 /src
parentdo not allow fake version reply: you should totally ignore version request or... (diff)
downloadKVIrc-6b81dbd1305f1fbabc8f11d11eb3f8e4e0de38da.tar.gz
KVIrc-6b81dbd1305f1fbabc8f11d11eb3f8e4e0de38da.tar.bz2
KVIrc-6b81dbd1305f1fbabc8f11d11eb3f8e4e0de38da.zip
removed _free function of plugin
git-svn-id: https://svn.kvirc.de/svn/trunk/kvirc@528 17fca916-40b9-46aa-a4ea-0a15b648b75c
Diffstat (limited to 'src')
-rw-r--r--src/modules/system/plugin.cpp35
-rw-r--r--src/modules/system/plugin.h2
2 files changed, 1 insertions, 36 deletions
diff --git a/src/modules/system/plugin.cpp b/src/modules/system/plugin.cpp
index 9d91c12b4..ba18ade47 100644
--- a/src/modules/system/plugin.cpp
+++ b/src/modules/system/plugin.cpp
@@ -47,16 +47,6 @@
@body:
TODO
[b]Exported functions by dll[/b][br]
- [br]_free function (needed)[br]
- [example]
- int _free(void * p)[br]
- {[br]
- // Always free the memory here![br]
- free(p);[br]
- return 0;[br]
- }[br]
- [/example]
-
[br]_load function (optional)[br]
[example]
int _load()[br]
@@ -115,20 +105,6 @@ KviPlugin* KviPlugin::load(const QString& szFileName)
return pPlugin;
}
-bool KviPlugin::pfree(char * pBuffer)
-{
- plugin_free function_free;
-
- function_free = (plugin_free)kvi_library_symbol(m_Plugin,"_free");
- if (function_free)
- {
- //TODO: THREAD
- if(pBuffer) function_free(pBuffer);
- return true;
- }
- return false;
-}
-
bool KviPlugin::unload(bool forced)
{
plugin_unload function_unload;
@@ -288,16 +264,7 @@ bool KviPluginManager::pluginCall(KviKvsModuleFunctionCall *c)
//Clean up
if(pArgvBuffer) free(pArgvBuffer);
if(ppArgv) free(ppArgv);
- if(returnBuffer)
- {
- if (!plugin->pfree(returnBuffer))
- {
- c->warning(__tr2qs("The plugin has no function to free memory. Can result in Memory Leaks!"));
- }
- }
-
-
-
+ if(returnBuffer) free(returnBuffer);
return true;
}
diff --git a/src/modules/system/plugin.h b/src/modules/system/plugin.h
index cd6002e5c..43c513fe3 100644
--- a/src/modules/system/plugin.h
+++ b/src/modules/system/plugin.h
@@ -32,7 +32,6 @@
typedef int (*plugin_function)(int argc, char* argv[], char ** buffer);
typedef int (*plugin_unload)();
typedef int (*plugin_load)();
-typedef int (*plugin_free)(char * pBuffer);
class KviPlugin
{
@@ -48,7 +47,6 @@ private:
QString m_szName;
public:
static KviPlugin* load(const QString& szFileName);
- bool pfree(char * pBuffer);
bool unload(bool forced);
int call(const QString& szFunctionName, int argc, char * argv[], char ** pBuffer);
QString name();