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 ![Go to previous message Go to previous message](/theme/Renegade_Forums/images/up.png) ![Go to next message Go to previous message](/theme/Renegade_Forums/images/down.png) |
![](http://renegadeforums.com/images/custom_avatars/20886.jpg) |
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ü!
|
|
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
[Plug-in] SSGM2.02 Ping Plugin
By: ExEric3 on Sat, 18 April 2009 14:28
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: [Plug-in] SSGM2.02 Ping Plugin
By: reborn on Sat, 18 April 2009 17:14
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: [Plug-in] SSGM2.02 Ping Plugin
By: ExEric3 on Sat, 18 April 2009 18:15
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: [Plug-in] SSGM2.02 Ping Plugin
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: [Plug-in] SSGM2.02 Ping Plugin
By: ExEric3 on Wed, 22 July 2009 09:57
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: [Plug-in] SSGM2.02 Ping Plugin
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: [Plug-in] SSGM2.02 Ping Plugin
By: jnz on Wed, 22 July 2009 11:55
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: [Plug-in] SSGM2.02 Ping Plugin
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: [Plug-in] SSGM2.02 Ping Plugin
By: ExEric3 on Wed, 22 July 2009 15:26
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: [Plug-in] SSGM2.02 Ping Plugin
By: raven on Wed, 22 July 2009 11:33
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: [Plug-in] SSGM2.02 Ping Plugin
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: [Plug-in] SSGM2.02 Ping Plugin
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: [Plug-in] SSGM2.02 Ping Plugin
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: [Plug-in] SSGM2.02 Ping Plugin
By: dr3w2 on Thu, 23 July 2009 19:36
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: [Plug-in] SSGM2.02 Ping Plugin
By: dr3w2 on Sat, 25 July 2009 14:56
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: [Plug-in] SSGM2.02 Ping Plugin
By: jnz on Sat, 25 July 2009 15:14
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: [Plug-in] SSGM2.02 Ping Plugin
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: [Plug-in] SSGM2.02 Ping Plugin
By: Goztow on Fri, 24 July 2009 05:31
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: [Plug-in] SSGM2.02 Ping Plugin
By: dr3w2 on Sat, 25 July 2009 15:16
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: [Plug-in] SSGM2.02 Ping Plugin
By: jnz on Sat, 25 July 2009 15:30
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: [Plug-in] SSGM2.02 Ping Plugin
By: Xpert on Fri, 12 November 2010 00:41
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: [Plug-in] SSGM2.02 Ping Plugin
By: ExEric3 on Sat, 13 November 2010 23:59
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: [Plug-in] SSGM2.02 Ping Plugin
By: reborn on Fri, 12 November 2010 02:45
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: [Plug-in] SSGM2.02 Ping Plugin
By: Xpert on Fri, 12 November 2010 13:25
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: [Plug-in] SSGM2.02 Ping Plugin
By: jnz on Fri, 12 November 2010 05:15
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: [Plug-in] SSGM2.02 Ping Plugin
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: [Plug-in] SSGM2.02 Ping Plugin
By: cAmpa on Fri, 12 November 2010 09:25
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: [Plug-in] SSGM2.02 Ping Plugin
By: jnz on Sat, 13 November 2010 13:22
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: [Plug-in] SSGM2.02 Ping Plugin
By: Xpert on Sun, 14 November 2010 01:37
|
![Read Message Read Message](/theme/Renegade_Forums/images/read.png) |
|
Re: [Plug-in] SSGM2.02 Ping Plugin
By: jnz on Tue, 16 November 2010 05:30
|
Goto Forum:
Current Time: Wed Aug 21 17:51:35 MST 2024
Total time taken to generate the page: 0.00950 seconds
|