fixed several memory leaks
fixed plugin listeners being removed before a OnPluginUnloaded Call_AskPluginLoad removed some virtuality all cached ptrs using the Stack system are freed now --HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%40647
This commit is contained in:
+33
-33
@@ -36,43 +36,43 @@ namespace SourcePawn
|
||||
bool IsDebugging();
|
||||
int SetDebugBreak(SPVM_DEBUGBREAK newpfn, SPVM_DEBUGBREAK *oldpfn);
|
||||
IPluginDebugInfo *GetDebugInfo();
|
||||
virtual int HeapAlloc(unsigned int cells, cell_t *local_addr, cell_t **phys_addr);
|
||||
virtual int HeapPop(cell_t local_addr);
|
||||
virtual int HeapRelease(cell_t local_addr);
|
||||
virtual int FindNativeByName(const char *name, uint32_t *index);
|
||||
virtual int GetNativeByIndex(uint32_t index, sp_native_t **native);
|
||||
virtual uint32_t GetNativesNum();
|
||||
virtual int FindPublicByName(const char *name, uint32_t *index);
|
||||
virtual int GetPublicByIndex(uint32_t index, sp_public_t **publicptr);
|
||||
virtual uint32_t GetPublicsNum();
|
||||
virtual int GetPubvarByIndex(uint32_t index, sp_pubvar_t **pubvar);
|
||||
virtual int FindPubvarByName(const char *name, uint32_t *index);
|
||||
virtual int GetPubvarAddrs(uint32_t index, cell_t *local_addr, cell_t **phys_addr);
|
||||
virtual uint32_t GetPubVarsNum();
|
||||
virtual int LocalToPhysAddr(cell_t local_addr, cell_t **phys_addr);
|
||||
virtual int LocalToString(cell_t local_addr, char **addr);
|
||||
virtual int StringToLocal(cell_t local_addr, size_t chars, const char *source);
|
||||
virtual int StringToLocalUTF8(cell_t local_addr, size_t maxbytes, const char *source, size_t *wrtnbytes);
|
||||
virtual int PushCell(cell_t value);
|
||||
virtual int PushCellArray(cell_t *local_addr, cell_t **phys_addr, cell_t array[], unsigned int numcells);
|
||||
virtual int PushString(cell_t *local_addr, char **phys_addr, const char *string);
|
||||
virtual int PushCellsFromArray(cell_t array[], unsigned int numcells);
|
||||
virtual int BindNatives(const sp_nativeinfo_t *natives, unsigned int num, int overwrite);
|
||||
virtual int BindNative(const sp_nativeinfo_t *native);
|
||||
virtual int BindNativeToAny(SPVM_NATIVE_FUNC native);
|
||||
virtual int Execute(uint32_t code_addr, cell_t *result);
|
||||
virtual cell_t ThrowNativeErrorEx(int error, const char *msg, ...);
|
||||
virtual cell_t ThrowNativeError(const char *msg, ...);
|
||||
virtual IPluginFunction *GetFunctionByName(const char *public_name);
|
||||
virtual IPluginFunction *GetFunctionById(funcid_t func_id);
|
||||
int HeapAlloc(unsigned int cells, cell_t *local_addr, cell_t **phys_addr);
|
||||
int HeapPop(cell_t local_addr);
|
||||
int HeapRelease(cell_t local_addr);
|
||||
int FindNativeByName(const char *name, uint32_t *index);
|
||||
int GetNativeByIndex(uint32_t index, sp_native_t **native);
|
||||
uint32_t GetNativesNum();
|
||||
int FindPublicByName(const char *name, uint32_t *index);
|
||||
int GetPublicByIndex(uint32_t index, sp_public_t **publicptr);
|
||||
uint32_t GetPublicsNum();
|
||||
int GetPubvarByIndex(uint32_t index, sp_pubvar_t **pubvar);
|
||||
int FindPubvarByName(const char *name, uint32_t *index);
|
||||
int GetPubvarAddrs(uint32_t index, cell_t *local_addr, cell_t **phys_addr);
|
||||
uint32_t GetPubVarsNum();
|
||||
int LocalToPhysAddr(cell_t local_addr, cell_t **phys_addr);
|
||||
int LocalToString(cell_t local_addr, char **addr);
|
||||
int StringToLocal(cell_t local_addr, size_t chars, const char *source);
|
||||
int StringToLocalUTF8(cell_t local_addr, size_t maxbytes, const char *source, size_t *wrtnbytes);
|
||||
int PushCell(cell_t value);
|
||||
int PushCellArray(cell_t *local_addr, cell_t **phys_addr, cell_t array[], unsigned int numcells);
|
||||
int PushString(cell_t *local_addr, char **phys_addr, const char *string);
|
||||
int PushCellsFromArray(cell_t array[], unsigned int numcells);
|
||||
int BindNatives(const sp_nativeinfo_t *natives, unsigned int num, int overwrite);
|
||||
int BindNative(const sp_nativeinfo_t *native);
|
||||
int BindNativeToAny(SPVM_NATIVE_FUNC native);
|
||||
int Execute(uint32_t code_addr, cell_t *result);
|
||||
cell_t ThrowNativeErrorEx(int error, const char *msg, ...);
|
||||
cell_t ThrowNativeError(const char *msg, ...);
|
||||
IPluginFunction *GetFunctionByName(const char *public_name);
|
||||
IPluginFunction *GetFunctionById(funcid_t func_id);
|
||||
#if defined SOURCEMOD_BUILD
|
||||
virtual SourceMod::IdentityToken_t *GetIdentity();
|
||||
SourceMod::IdentityToken_t *GetIdentity();
|
||||
void SetIdentity(SourceMod::IdentityToken_t *token);
|
||||
#endif
|
||||
public: //IPluginDebugInfo
|
||||
virtual int LookupFile(ucell_t addr, const char **filename);
|
||||
virtual int LookupFunction(ucell_t addr, const char **name);
|
||||
virtual int LookupLine(ucell_t addr, uint32_t *line);
|
||||
int LookupFile(ucell_t addr, const char **filename);
|
||||
int LookupFunction(ucell_t addr, const char **name);
|
||||
int LookupLine(ucell_t addr, uint32_t *line);
|
||||
public:
|
||||
void SetContext(sp_context_t *_ctx);
|
||||
private:
|
||||
|
||||
@@ -32,13 +32,13 @@ class CContextTrace : public IContextTrace
|
||||
public:
|
||||
CContextTrace(TracedCall *pStart, int error, const char *msg, uint32_t native);
|
||||
public:
|
||||
virtual int GetErrorCode();
|
||||
virtual const char *GetErrorString();
|
||||
virtual bool DebugInfoAvailable();
|
||||
virtual const char *GetCustomErrorString();
|
||||
virtual bool GetTraceInfo(CallStackInfo *trace);
|
||||
virtual void ResetTrace();
|
||||
virtual const char *GetLastNative(uint32_t *index);
|
||||
int GetErrorCode();
|
||||
const char *GetErrorString();
|
||||
bool DebugInfoAvailable();
|
||||
const char *GetCustomErrorString();
|
||||
bool GetTraceInfo(CallStackInfo *trace);
|
||||
void ResetTrace();
|
||||
const char *GetLastNative(uint32_t *index);
|
||||
private:
|
||||
int m_Error;
|
||||
const char *m_pMsg;
|
||||
@@ -47,7 +47,6 @@ private:
|
||||
uint32_t m_Native;
|
||||
};
|
||||
|
||||
|
||||
class SourcePawnEngine : public ISourcePawnEngine
|
||||
{
|
||||
public:
|
||||
|
||||
Reference in New Issue
Block a user