Home » Renegade Discussions » Mod Release Forum » [Plug-in] SSGM2.02 Ping Plugin
( ) 1 Vote
Re: [Plug-in] SSGM2.02 Ping Plugin [message #439325 is a reply to message #439317] |
Fri, 12 November 2010 09:25   |
 |
cAmpa
Messages: 597 Registered: March 2006
Karma:
|
Colonel |
|
|
Jerad Gray wrote on Fri, 12 November 2010 16:53 |
jnz wrote on Fri, 12 November 2010 05:15 | 2 mem leaks there.
std::string sender = Get_Player_Name_By_ID(ID);
name = Get_Player_Name(obj);
Appropriate changes would be:
const char *sender_cstr = Get_Player_Name_By_ID(ID);
std::string sender(sender_cstr);
delete []sender_cstr;
const char *name_cstr = Get_Player_Name(obj);
name = std::string(name_cstr); //you don't need to explicitly call the ctor as the assignment operator is overloaded. Just added for clarity.
delete []name_cstr;
|
Incorrect, you only have to worry about deleting it if you had new char *, otherwise all the * does is auto allocate the size of the array of chars, and is still cleaned up like any normal variable.
|
Look into Get_Player_Name.
Bückstabü!
|
|
|
 |
|
[Plug-in] SSGM2.02 Ping Plugin
By: ExEric3 on Sat, 18 April 2009 14:28
|
 |
|
Re: [Plug-in] SSGM2.02 Ping Plugin
By: reborn on Sat, 18 April 2009 17:14
|
 |
|
Re: [Plug-in] SSGM2.02 Ping Plugin
By: ExEric3 on Sat, 18 April 2009 18:15
|
 |
|
Re: [Plug-in] SSGM2.02 Ping Plugin
|
 |
|
Re: [Plug-in] SSGM2.02 Ping Plugin
By: ExEric3 on Wed, 22 July 2009 09:57
|
 |
|
Re: [Plug-in] SSGM2.02 Ping Plugin
|
 |
|
Re: [Plug-in] SSGM2.02 Ping Plugin
By: jnz on Wed, 22 July 2009 11:55
|
 |
|
Re: [Plug-in] SSGM2.02 Ping Plugin
|
 |
|
Re: [Plug-in] SSGM2.02 Ping Plugin
By: ExEric3 on Wed, 22 July 2009 15:26
|
 |
|
Re: [Plug-in] SSGM2.02 Ping Plugin
By: raven on Wed, 22 July 2009 11:33
|
 |
|
Re: [Plug-in] SSGM2.02 Ping Plugin
|
 |
|
Re: [Plug-in] SSGM2.02 Ping Plugin
|
 |
|
Re: [Plug-in] SSGM2.02 Ping Plugin
|
 |
|
Re: [Plug-in] SSGM2.02 Ping Plugin
By: dr3w2 on Thu, 23 July 2009 19:36
|
 |
|
Re: [Plug-in] SSGM2.02 Ping Plugin
By: dr3w2 on Sat, 25 July 2009 14:56
|
 |
|
Re: [Plug-in] SSGM2.02 Ping Plugin
By: jnz on Sat, 25 July 2009 15:14
|
 |
|
Re: [Plug-in] SSGM2.02 Ping Plugin
|
 |
|
Re: [Plug-in] SSGM2.02 Ping Plugin
By: Goztow on Fri, 24 July 2009 05:31
|
 |
|
Re: [Plug-in] SSGM2.02 Ping Plugin
By: dr3w2 on Sat, 25 July 2009 15:16
|
 |
|
Re: [Plug-in] SSGM2.02 Ping Plugin
By: jnz on Sat, 25 July 2009 15:30
|
 |
|
Re: [Plug-in] SSGM2.02 Ping Plugin
By: Xpert on Fri, 12 November 2010 00:41
|
 |
|
Re: [Plug-in] SSGM2.02 Ping Plugin
By: ExEric3 on Sat, 13 November 2010 23:59
|
 |
|
Re: [Plug-in] SSGM2.02 Ping Plugin
By: reborn on Fri, 12 November 2010 02:45
|
 |
|
Re: [Plug-in] SSGM2.02 Ping Plugin
By: Xpert on Fri, 12 November 2010 13:25
|
 |
|
Re: [Plug-in] SSGM2.02 Ping Plugin
By: jnz on Fri, 12 November 2010 05:15
|
 |
|
Re: [Plug-in] SSGM2.02 Ping Plugin
|
 |
|
Re: [Plug-in] SSGM2.02 Ping Plugin
By: cAmpa on Fri, 12 November 2010 09:25
|
 |
|
Re: [Plug-in] SSGM2.02 Ping Plugin
By: jnz on Sat, 13 November 2010 13:22
|
 |
|
Re: [Plug-in] SSGM2.02 Ping Plugin
By: Xpert on Sun, 14 November 2010 01:37
|
 |
|
Re: [Plug-in] SSGM2.02 Ping Plugin
By: jnz on Tue, 16 November 2010 05:30
|
Goto Forum:
Current Time: Wed Feb 19 12:31:04 MST 2025
Total time taken to generate the page: 0.01485 seconds
|