ryan20fun's Profile User Rating: *****

Reputation: 6 Worker
Group:
Active Members
Active Posts:
109 (0.12 per day)
Joined:
20-December 10
Profile Views:
871
Last Active:
User is offline Nov 13 2012 02:54 AM
Currently:
Offline

Previous Fields

Country:
ZA
OS Preference:
Windows
Favorite Browser:
FireFox
Favorite Processor:
AMD
Favorite Gaming Platform:
PC
Your Car:
Who Cares
Dream Kudos:
0

Latest Visitors

Icon   ryan20fun has not set their status

Posts I've Made

  1. In Topic: Cannot Get DLL From Visual C++ To Work On Any Machine But My Own?

    Posted 5 Jan 2012

    View Postadn258, on 04 January 2012 - 11:46 PM, said:

    View Postryan20fun, on 03 January 2012 - 10:12 PM, said:

    View Postadn258, on 08 December 2011 - 12:37 AM, said:

    MSVCR100D.dll is missing from the computer.

    Thats the problem right there.
    your trying to use a Debug version of VC++ 2010 Runtime, the only way for that to work is to install Visual Studio.

    change to Retail build and see if that works :)


    I'm about to make a video if this doesn't work. How do I go about doing this?

    what do you mean exactly ?

    if you mean a video of build / deployment etc, you could use "Cam Studio"(camstudio.org).
  2. In Topic: Cannot Get DLL From Visual C++ To Work On Any Machine But My Own?

    Posted 3 Jan 2012

    View Postadn258, on 08 December 2011 - 12:37 AM, said:

    MSVCR100D.dll is missing from the computer.

    Thats the problem right there.
    your trying to use a Debug version of VC++ 2010 Runtime, the only way for that to work is to install Visual Studio.

    change to Retail build and see if that works :)
  3. In Topic: Vector of Double Pointer Problems

    Posted 19 Dec 2011

    View PostCTphpnwb, on 17 December 2011 - 11:32 AM, said:

    If you're using vectors then why are you using pointers?

    because TIPGExLResource is an abstract class / interface.
  4. In Topic: Vector of Double Pointer Problems

    Posted 17 Dec 2011

    View PostOler1s, on 17 December 2011 - 10:01 AM, said:

    By the way, you do not need to quote my whole post. I can scroll.

    sorry

    View PostOler1s, on 17 December 2011 - 10:01 AM, said:

    Quote

    when i pushed the pointer onto the vector and then released then deleted the resource the code caused an exception because the pointer in the vector pointed to memory that was deleted.
    So, somehow, your code already calls delete between allocation and when you expect to free that allocated block.

    So the correct approach at this point is to figure out why your code is freeing that memory when you don't want it to free, right?

    The wrong approach is to switch around types in hopes the problem will go away.

    i just relized now that what i was doing was bad, i was using new from a DLL and then calling delete from the exe( is the reason why this did not blow up because im using the same runtim for both ? )

    View PostOler1s, on 17 December 2011 - 10:01 AM, said:

    It looks like you're emulating the Direct3D's use of double pointers without understanding why they do that. So in your code, I see no reason for a double pointer, yet you're using them everywhere. It's bizarre.

    your spot on, i used that because i followed a books code on how to load DLL's at runtime for the graphics section of the engine.
    so why are double pointers used ?

    so im going to rework the classes a bit so that they request removel of themselves instead of trying to do somthing that was proberbly imposible( checking if the pointer was deleted )

    Thanks EveryOne
    :) :) :)
  5. In Topic: Vector of Double Pointer Problems

    Posted 17 Dec 2011

    View PostOler1s, on 16 December 2011 - 10:41 PM, said:

    > so how would i keep track of the pointer without uing a double pointer ?

    I don't see why you can't.

    > because the vector just store a copy of the pointer

    Yes, but you don't care about this. Think about how you would free the resource.

    delete p;

    Let me ask you this. What matters here? The value of p, or whether p was the original pointer or a copy? Let me put it another way, is this invalid:

    int * a = new int;
    int * b = a;
    delete b;
    
    


    Do you think that is invalid? If no, then you think a copy is fine. Which is inconsistent with your argument. If you say it is invalid, then you believe the argument to the delete operator is the original variable, which is quite wrong.

    Quote

    there is a problem because im trying to release something that does not exist any more.
    Only if you discard the pointer itself. If you copy it around, you still have that value.


    when i pushed the pointer onto the vector and then released then deleted the resource the code caused an exception because the pointer in the vector pointed to memory that was deleted.

    so i asked the question here to see if any one knew how to do what i was doing slightly diffeently.

    i could just make the resource remove itself from the vector( i have no problem with that ) i just want to find out how to do this so i know what to do if i were to do something similar in the future.

My Information

Member Title:
D.I.C Head
Age:
21 years old
Birthday:
November 3, 1991
Gender:
Location:
South Africa
Interests:
Programeing 'ofcorse'
Camping & Hiking
Years Programming:
4
Programming Languages:
C++

Contact Information

E-mail:
Private
Skype:
Skype  ryan20fun

Comments

ryan20fun has no profile comments yet. Why not say hello?