Comment on revision r4880 in wagic

2 views
Skip to first unread message

wa...@googlecode.com

unread,
Oct 25, 2013, 6:04:34 PM10/25/13
to wagi...@googlegroups.com
Comment by omegabla...@gmail.com:

General Comment:
did you test this extensively?
3571 + SAFE_DELETE(toPay);
3572 + SAFE_DELETE(mClone);

this here is potentially dangerous in this ability if my mind serves me
right.

For more information:
https://code.google.com/p/wagic/source/detail?r=4880

wa...@googlecode.com

unread,
Oct 26, 2013, 6:09:24 AM10/26/13
to wagi...@googlegroups.com
Comment by pank...@gmail.com:

General Comment:
Could you please explain, why is it dangerous?
(Actually, I am not quite sure about the concept of object ownership that
is common in this project).

How do I suppose to test this kind of stuff? Do you use special tools that
check this type of things?
Most of the time I play it on android using the build based on the last SVN
revision. Haven't experienced any issues with this code so far.

wa...@googlecode.com

unread,
Oct 26, 2013, 6:26:16 AM10/26/13
to wagi...@googlegroups.com
Comment by omegabla...@gmail.com:

General Comment:
Because some abilities like pay( and multi ability delay the abilities
until conditions are met, and some reuse the same object. infact i remember
topay being directly related to the menuability may pay.

wa...@googlecode.com

unread,
Oct 26, 2013, 8:07:56 AM10/26/13
to wagi...@googlegroups.com
Comment by pank...@gmail.com:

General Comment:
So, if some abilities reuse the same object, then we should introduce some
smart pointers (like shared_ptr) there instead of raw pointer. Otherwise we
will always have memory leaks there.
Is there any reason why we are not using smart pointers?

wa...@googlecode.com

unread,
Oct 26, 2013, 8:11:26 AM10/26/13
to wagi...@googlegroups.com
Comment by omegabla...@gmail.com:

No devs is the reason. :)
On Oct 26, 2013 8:07 AM, <wa...@googlecode.com> wrote:

> Comment by pank.dm:

> General Comment:
> So, if some abilities reuse the same object, then we should introduce some
> smart pointers (like shared_ptr) there instead of raw pointer. Otherwise
> we
> will always have memory leaks there.
> Is there any reason why we are not using smart pointers?

> For more information:
> https://code.google.com/p/**wagic/source/detail?r=4880<https://code.google.com/p/wagic/source/detail?r=4880>
> --
> You received this message because you starred the review page.
> You may adjust your notification preferences at:
> https://code.google.com/**hosting/settings<https://code.google.com/hosting/settings>

> Reply to this email to add a comment.


For more information:
http://code.google.com/p/wagic/source/detail?r=4880

wa...@googlecode.com

unread,
Nov 1, 2013, 1:34:15 PM11/1/13
to wagi...@googlegroups.com
Comment by techdrag...@gmail.com:

General Comment:
hold on. I recall distinctly that either Wil or Yann started using smart
pointers in the code a year ago? Was all that work narrowly focused? I
recall a discussion about using them and having them implemented in the
code. Maybe that was only related to the graphics rendering engine. but I
could swear that the usage of smart pointers was introduced at least.

wa...@googlecode.com

unread,
Nov 1, 2013, 2:34:38 PM11/1/13
to wagi...@googlegroups.com
Comment by omegabla...@gmail.com:

Through boost, yes, i think that was the plan. Which is why I sounded
confused when boost was removed.
On Nov 1, 2013 1:34 PM, <wa...@googlecode.com> wrote:

> Comment by techdragon.nguyen:

> General Comment:
> hold on. I recall distinctly that either Wil or Yann started using smart
> pointers in the code a year ago? Was all that work narrowly focused? I
> recall a discussion about using them and having them implemented in the
> code. Maybe that was only related to the graphics rendering engine. but
> I
> could swear that the usage of smart pointers was introduced at least.

> For more information:
Reply all
Reply to author
Forward
0 new messages