bugGnash - The GNU Flash player - Bugs: bug #18907, Player

 
 

bug #18907: Player

Submitted by:  Dongdong <dedodong>
Submitted on:  Tue 30 Jan 2007 10:04:04 AM UTC  
 
Category: coreSeverity: 3 - Normal
Release: NoneStatus: Invalid
Privacy: PublicAssigned to: Sandro Santilli <strk>
Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Thu 01 Feb 2007 01:21:08 AM UTC, comment #5:

En, I am not understand the boost::intrusive_ptr.
Hehe. thank you very much.

Dongdong <dedodong>
Wed 31 Jan 2007 04:51:42 PM UTC, comment #4:

I just ran a test and the results are as you described. So I guess this bug is indeed invalid.

Bastiaan Jacques <bjacques>
Project Member
Wed 31 Jan 2007 10:52:17 AM UTC, comment #3:

We should test this.

boost::intrusive_ptr<any_ref_counted> a = new any_ref_counted();
assert(a->get_ref_count() == 1);
boost::intrusive_ptr<any_ref_counted> b = new any_ref_counted();
assert(b->get_ref_count() == 1);
b=a;
assert(b->get_ref_count() == 2);
assert(b.get() == a.get());

.. and check that first any_ref_counted() was deleted ...

Sandro Santilli <strk>
Project MemberIn charge of this item.
Wed 31 Jan 2007 10:17:31 AM UTC, comment #2:

Actually... looking at the implementation in intrusive_ptr.hpp, it seems that operator= calls swap(), which merely swaps the pointers and doesn't delete the old pointer (or decrease the reference count).

Bastiaan Jacques <bjacques>
Project Member
Tue 30 Jan 2007 10:13:47 AM UTC, comment #1:

The _movie member is a boost::intrusive pointer. When overridden the old value will be deleted if reference count goes to zero.

Sandro Santilli <strk>
Project MemberIn charge of this item.
Tue 30 Jan 2007 10:04:04 AM UTC, original submission:

in ../server/movie_root.cpp : 90

it will may be happen memory leak .

void movie_root::setRootMovie(movie_instance* movie)
{
assert(movie != NULL);
_movie = movie;
.......
}

i think shoul like this:

void movie_root::setRootMovie(movie_instance* movie)
{
assert(movie != NULL);
if(_movie.get()!=NULL) {
sprite_instance* old_movie=_movie.get();
delete old_movie;
}
_movie = movie;
.......
}

Dongdong <dedodong>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by martinwguy (Updated the item)
  • -unavailable- added by bjacques (Posted a comment)
  • -unavailable- added by strk (Posted a comment)
  • -unavailable- added by dedodong (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 03 Mar 2007 02:23:51 PM UTCmartinwguyOpen/ClosedOpen=>Closed
    Tue 30 Jan 2007 10:13:47 AM UTCstrkCategorygui=>core
      StatusNone=>Invalid
      Assigned toNone=>strk

    Back to the top


    Powered by Savane 3.1-cleanup1