Thread: do you have to delete the programs

  1. #1
    Registered User
    Join Date
    Mar 2006
    Posts
    25
    a little off topic but i would be willing to pay money if someone can tell me how to clean up the function "LoadFromFile", from the VCL library.

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  3. #3
    Devil's Advocate SlyMaelstrom's Avatar
    Join Date
    May 2004
    Location
    Out of scope
    Posts
    4,079
    Anyway, like anything else, you just delete the pointer you called the function on.
    Code:
    Graphics::TBitmap *bitmap1;
    bitmap1   = new Graphics::TBitmap;
    bitmap1->LoadFromFile("C:\\BcbFoundResources\\Bitmaps\\Titles.bmp");
    delete bitmap1;
    Sent from my iPadŽ

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. C Delete opened file
    By gidion in forum C Programming
    Replies: 25
    Last Post: 12-04-2008, 10:35 AM
  2. Delete Function in Doubly Linked List
    By Dampecram in forum C Programming
    Replies: 5
    Last Post: 11-15-2008, 04:30 PM
  3. can we debug into delete
    By George2 in forum C++ Programming
    Replies: 3
    Last Post: 11-20-2007, 05:45 AM
  4. do you have to delete the programs
    By roaddoggwwe in forum C++ Programming
    Replies: 2
    Last Post: 03-22-2006, 10:48 AM
  5. Problem need help
    By Srpurdy in forum C++ Programming
    Replies: 1
    Last Post: 07-24-2002, 12:45 PM